for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Oqq\Minc\Log\Handler;
/**
* @author Eric Braun <[email protected]>
*/
trait HandlerContainerTrait
{
/** @var \SplStack|HandlerInterface[] */
protected $handlers;
* @return HandlerInterface[]
public function getHandlers()
$this->initHandlers();
return $this->handlers;
}
* @inheritdoc
public function setHandlers(array $handlers)
$this->initHandlers(true);
$this->pushHandler(...$handlers);
public function pushHandler(HandlerInterface ...$handlers)
foreach ($handlers as $handler) {
$this->handlers->push($handler);
* @param bool $reset
protected function initHandlers($reset = false)
if ($reset || null === $this->handlers) {
$this->handlers = new \SplStack();