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