Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Config / ReaderPluginManager.php
blob8b0a3ee048f79079974dd41fdd4cfc50e558bbd5
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Config;
12 use Zend\ServiceManager\AbstractPluginManager;
14 class ReaderPluginManager extends AbstractPluginManager
16 /**
17 * Default set of readers
19 * @var array
21 protected $invokableClasses = array(
22 'ini' => 'Zend\Config\Reader\Ini',
23 'json' => 'Zend\Config\Reader\Json',
24 'xml' => 'Zend\Config\Reader\Xml',
25 'yaml' => 'Zend\Config\Reader\Yaml',
28 /**
29 * Validate the plugin
30 * Checks that the reader loaded is an instance of Reader\ReaderInterface.
32 * @param Reader\ReaderInterface $plugin
33 * @return void
34 * @throws Exception\InvalidArgumentException if invalid
36 public function validatePlugin($plugin)
38 if ($plugin instanceof Reader\ReaderInterface) {
39 // we're okay
40 return;
43 throw new Exception\InvalidArgumentException(sprintf(
44 'Plugin of type %s is invalid; must implement %s\Reader\ReaderInterface',
45 (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
46 __NAMESPACE__
47 ));