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 / Log / ProcessorPluginManager.php
blob3b2a850026f7542c4fe06df3efe41737d14a71bb
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\Log;
12 use Zend\ServiceManager\AbstractPluginManager;
14 class ProcessorPluginManager extends AbstractPluginManager
16 /**
17 * Default set of writers
19 * @var array
21 protected $invokableClasses = array(
22 'backtrace' => 'Zend\Log\Processor\Backtrace',
23 'requestid' => 'Zend\Log\Processor\RequestId',
26 /**
27 * Allow many writers of the same type
29 * @var bool
31 protected $shareByDefault = false;
33 /**
34 * Validate the plugin
36 * Checks that the processor loaded is an instance of Processor\ProcessorInterface.
38 * @param mixed $plugin
39 * @return void
40 * @throws Exception\InvalidArgumentException if invalid
42 public function validatePlugin($plugin)
44 if ($plugin instanceof Processor\ProcessorInterface) {
45 // we're okay
46 return;
49 throw new Exception\InvalidArgumentException(sprintf(
50 'Plugin of type %s is invalid; must implement %s\Processor\ProcessorInterface',
51 (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
52 __NAMESPACE__
53 ));