Handler.php 722 Bytes
<?php
/**
 * Created by PhpStorm.
 * User: Zip
 * Date: 15/4/26
 * Time: 下午1:32
 */

namespace Hood\Debug\Debugbar;

use Hood\Debug\Debugbar\Bridge;
use Hood\Debug\Debugbar\CollectorInterface;

class Handler extends HandlerAbstract
{
    public function addExceptionCollector($exception)
    {
        $this->addCollector(new ExceptionCollector($exception));
    }

    public function addErrorCollector(CollectorInterface\Error $error)
    {
        $this->addCollector(new ErrorCollector($error));
    }

    public function render()
    {
        return $this->debugLogs;
    }

    public function bridge($bridge = 'bar')
    {
        $_bridge = new Bridge\Bar();
        $_bridge->send($this->debugLogs);
    }
}