'Zend\Cache\Storage\Plugin\ClearExpiredByFactor', 'exceptionhandler' => 'Zend\Cache\Storage\Plugin\ExceptionHandler', 'ignoreuserabort' => 'Zend\Cache\Storage\Plugin\IgnoreUserAbort', 'optimizebyfactor' => 'Zend\Cache\Storage\Plugin\OptimizeByFactor', 'serializer' => 'Zend\Cache\Storage\Plugin\Serializer', ); /** * Do not share by default * * @var array */ protected $shareByDefault = false; /** * Validate the plugin * * Checks that the plugin loaded is an instance of Plugin\PluginInterface. * * @param mixed $plugin * @return void * @throws Exception\RuntimeException if invalid */ public function validatePlugin($plugin) { if ($plugin instanceof Plugin\PluginInterface) { // we're okay return; } throw new Exception\RuntimeException(sprintf( 'Plugin of type %s is invalid; must implement %s\Plugin\PluginInterface', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } }