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
12 use Zend\ServiceManager\AbstractPluginManager
;
14 class ProcessorPluginManager
extends AbstractPluginManager
17 * Default set of processors
21 protected $invokableClasses = array(
22 'backtrace' => 'Zend\Log\Processor\Backtrace',
23 'referenceid' => 'Zend\Log\Processor\ReferenceId',
24 'requestid' => 'Zend\Log\Processor\RequestId',
28 * Allow many processors of the same type
32 protected $shareByDefault = false;
37 * Checks that the processor loaded is an instance of Processor\ProcessorInterface.
39 * @param mixed $plugin
41 * @throws Exception\InvalidArgumentException if invalid
43 public function validatePlugin($plugin)
45 if ($plugin instanceof Processor\ProcessorInterface
) {
50 throw new Exception\
InvalidArgumentException(sprintf(
51 'Plugin of type %s is invalid; must implement %s\Processor\ProcessorInterface',
52 (is_object($plugin) ?
get_class($plugin) : gettype($plugin)),