'Zend\Crypt\Symmetric\Mcrypt', ); /** * Do not share by default * * @var bool */ protected $shareByDefault = false; /** * Validate the plugin * * Checks that the adapter loaded is an instance * of Symmetric\SymmetricInterface. * * @param mixed $plugin * @return void * @throws Exception\InvalidArgumentException if invalid */ public function validatePlugin($plugin) { if ($plugin instanceof Symmetric\SymmetricInterface) { // we're okay return; } throw new Exception\InvalidArgumentException(sprintf( 'Plugin of type %s is invalid; must implement %s\Symmetric\SymmetricInterface', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } }