src/Core/Error/ErrorManager.php
public function addHandler(callable $handler, $name = null)
    {
        if ($name) {
            $this->handlers[$name] = $handler;
        } else {
            $this->handlers[] = $handler;
        }

        return $this;
    }
public function addHandler(callable $handler, $name = null)
    {
        if ($name) {
            $this->handlers[$name] = $handler;
        } else {
            $this->handlers[] = $handler;
        }

        return $this;
    }
public function addHandler ( callable $ handler , $ name = null ) { if ( $ name ) { $ this -> handlers [ $ name ] = $ handler ; } else { $ this -> handlers [ ] = $ handler ; } return $ this ; }
Method to set property handler

@param   callable $handler
@param   string   $name

@return static Return self to support chaining.
Method to set property handler