classLoggerimplementsLoggerInterface { publicfunctionpushProcessor($callback) { if (!is_callable($callback)) { thrownew\InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); } array_unshift($this->processors, $callback);
return$this; }
publicfunctionpopProcessor() { if (!$this->processors) { thrownew\LogicException('You tried to pop from an empty processor stack.'); }
publicfunctionpushProcessor($callback) { if (!is_callable($callback)) { thrownew\InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); } array_unshift($this->processors, $callback);
return$this; }
publicfunctionpopProcessor() { if (!$this->processors) { thrownew\LogicException('You tried to pop from an empty processor stack.'); }