'Zend\Log\Writer\ChromePhp', 'db' => 'Zend\Log\Writer\Db', 'fingerscrossed' => 'Zend\Log\Writer\FingersCrossed', 'firephp' => 'Zend\Log\Writer\FirePhp', 'mail' => 'Zend\Log\Writer\Mail', 'mock' => 'Zend\Log\Writer\Mock', 'null' => 'Zend\Log\Writer\Null', 'stream' => 'Zend\Log\Writer\Stream', 'syslog' => 'Zend\Log\Writer\Syslog', 'zendmonitor' => 'Zend\Log\Writer\ZendMonitor', ); /** * Allow many writers of the same type * * @var bool */ protected $shareByDefault = false; /** * Validate the plugin * * Checks that the writer loaded is an instance of Writer\WriterInterface. * * @param mixed $plugin * @return void * @throws Exception\InvalidArgumentException if invalid */ public function validatePlugin($plugin) { if ($plugin instanceof Writer\WriterInterface) { // we're okay return; } throw new Exception\InvalidArgumentException(sprintf( 'Plugin of type %s is invalid; must implement %s\Writer\WriterInterface', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } }