'Zend\Log\Formatter\Base', 'simple' => 'Zend\Log\Formatter\Simple', 'xml' => 'Zend\Log\Formatter\Xml', 'db' => 'Zend\Log\Formatter\Db', 'errorhandler' => 'Zend\Log\Formatter\ErrorHandler', 'exceptionhandler' => 'Zend\Log\Formatter\ExceptionHandler', ); /** * Allow many filters of the same type * * @var bool */ protected $shareByDefault = false; /** * Validate the plugin * * Checks that the formatter loaded is an instance of Formatter\FormatterInterface. * * @param mixed $plugin * @return void * @throws Exception\InvalidArgumentException if invalid */ public function validatePlugin($plugin) { if ($plugin instanceof Formatter\FormatterInterface) { // we're okay return; } throw new Exception\InvalidArgumentException(sprintf( 'Plugin of type %s is invalid; must implement %s\Formatter\FormatterInterface', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } }