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 / WriterPluginManager.php
blob058520f0f955eaa80a9bc56f17a2e8b20977d0e9
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 WriterPluginManager extends AbstractPluginManager
16 /**
17 * Default set of writers
19 * @var array
21 protected $invokableClasses = array(
22 'chromephp' => 'Zend\Log\Writer\ChromePhp',
23 'db' => 'Zend\Log\Writer\Db',
24 'fingerscrossed' => 'Zend\Log\Writer\FingersCrossed',
25 'firephp' => 'Zend\Log\Writer\FirePhp',
26 'mail' => 'Zend\Log\Writer\Mail',
27 'mock' => 'Zend\Log\Writer\Mock',
28 'null' => 'Zend\Log\Writer\Null',
29 'stream' => 'Zend\Log\Writer\Stream',
30 'syslog' => 'Zend\Log\Writer\Syslog',
31 'zendmonitor' => 'Zend\Log\Writer\ZendMonitor',
34 /**
35 * Allow many writers of the same type
37 * @var bool
39 protected $shareByDefault = false;
41 /**
42 * Validate the plugin
44 * Checks that the writer loaded is an instance of Writer\WriterInterface.
46 * @param mixed $plugin
47 * @return void
48 * @throws Exception\InvalidArgumentException if invalid
50 public function validatePlugin($plugin)
52 if ($plugin instanceof Writer\WriterInterface) {
53 // we're okay
54 return;
57 throw new Exception\InvalidArgumentException(sprintf(
58 'Plugin of type %s is invalid; must implement %s\Writer\WriterInterface',
59 (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
60 __NAMESPACE__
61 ));