'Zend\Config\Reader\Ini', 'json' => 'Zend\Config\Reader\Json', 'xml' => 'Zend\Config\Reader\Xml', 'yaml' => 'Zend\Config\Reader\Yaml', ); /** * Validate the plugin * Checks that the reader loaded is an instance of Reader\ReaderInterface. * * @param Reader\ReaderInterface $plugin * @return void * @throws Exception\InvalidArgumentException if invalid */ public function validatePlugin($plugin) { if ($plugin instanceof Reader\ReaderInterface) { // we're okay return; } throw new Exception\InvalidArgumentException(sprintf( 'Plugin of type %s is invalid; must implement %s\Reader\ReaderInterface', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } }