public function register($handledErrors = E_ALL)
    {
        $errHandler = [$this, 'handleError'];
        $exHandler = [$this, 'handleException'];

        $handledErrors = is_int($handledErrors) ? $handledErrors : E_ALL;

        set_error_handler($errHandler, $handledErrors);
        set_exception_handler($exHandler);

        return $this;
    }
public function register($handledErrors = E_ALL)
    {
        $errHandler = [$this, 'handleError'];
        $exHandler = [$this, 'handleException'];

        $handledErrors = is_int($handledErrors) ? $handledErrors : E_ALL;

        set_error_handler($errHandler, $handledErrors);
        set_exception_handler($exHandler);

        return $this;
    }
public function register ( $ handledErrors = E_ALL ) { $ errHandler = [ $ this , 'handleError' ] ; $ exHandler = [ $ this , 'handleException' ] ; $ handledErrors = is_int ( $ handledErrors ) ? $ handledErrors : E_ALL ; set_error_handler ( $ errHandler , $ handledErrors ) ; set_exception_handler ( $ exHandler ) ; return $ this ; }
Register this handler as the exception and error handler.

@param int|null $handledErrors

@return self
Register this handler as the exception and error handler .