for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Oqq\Minc\Log\Handler;
use Oqq\Minc\Log\Record;
/**
* @author Eric Braun <[email protected]>
*/
class CascadeHandler extends AbstractHandler implements HandlerContainerInterface
{
use HandlerContainerTrait;
* @param HandlerInterface[] $handlers
* @param int $level
* @param bool $pass
public function __construct(
array $handlers,
$level = HandlerInterface::DEFAULT_LEVEL,
$pass = HandlerInterface::DEFAULT_PASS
) {
parent::__construct($level, $pass);
$this->setHandlers($handlers);
}
* @inheritdoc
public function isHandling(Record $record)
if (!parent::isHandling($record)) {
return false;
foreach ($this->getHandlers() as $handler) {
if ($handler->isHandling($record)) {
return true;
protected function write(Record $record)
$handler->handle($record);