fix calendar css, take 2. (#213)
[openemr.git] / interface / modules / zend_modules / library / Zend / Config / ReaderPluginManager.php
blob4c350643fbf6ba555f34a2cc38dc06e58bd956c9
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-2015 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',
26 'javaproperties' => 'Zend\Config\Reader\JavaProperties',
29 /**
30 * Validate the plugin
31 * Checks that the reader loaded is an instance of Reader\ReaderInterface.
33 * @param Reader\ReaderInterface $plugin
34 * @return void
35 * @throws Exception\InvalidArgumentException if invalid
37 public function validatePlugin($plugin)
39 if ($plugin instanceof Reader\ReaderInterface) {
40 // we're okay
41 return;
44 throw new Exception\InvalidArgumentException(sprintf(
45 'Plugin of type %s is invalid; must implement %s\Reader\ReaderInterface',
46 (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
47 __NAMESPACE__
48 ));