'Zend\I18n\Translator\Loader\Gettext', 'ini' => 'Zend\I18n\Translator\Loader\Ini', 'phparray' => 'Zend\I18n\Translator\Loader\PhpArray', ); /** * Validate the plugin. * * Checks that the filter loaded is an instance of * Loader\FileLoaderInterface or Loader\RemoteLoaderInterface. * * @param mixed $plugin * @return void * @throws Exception\RuntimeException if invalid */ public function validatePlugin($plugin) { if ($plugin instanceof Loader\FileLoaderInterface || $plugin instanceof Loader\RemoteLoaderInterface) { // we're okay return; } throw new Exception\RuntimeException(sprintf( 'Plugin of type %s is invalid; must implement %s\Loader\FileLoaderInterface or %s\Loader\RemoteLoaderInterface', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } }