Run
    
            
            in package
            
        
    
            
            implements
                            RunInterface                    
    
    
Table of Contents
Interfaces
Properties
- $allowQuit : bool
- $canThrowExceptions : bool
- In certain scenarios, like in shutdown handler, we can not throw exceptions.
- $handlerStack : array<string|int, HandlerInterface>
- $isRegistered : bool
- $sendExitCode : int|false
- $sendHttpCode : int|false
- $sendOutput : bool
- $silencedPatterns : array<string|int, mixed>
- $system : SystemFacade
Methods
- __construct() : mixed
- allowQuit() : bool
- Should Whoops allow Handlers to force the script to quit?
- appendHandler() : Run
- Explicitly request your handler runs as the last of all currently registered handlers.
- clearHandlers() : Run
- Clears all handlers in the handlerStack, including the default PrettyPage handler.
- getHandlers() : array<string|int, mixed>
- Returns an array with all handlers, in the order they were added to the stack.
- getSilenceErrorsInPaths() : array<string|int, mixed>
- Returns an array with silent errors in path configuration.
- handleError() : bool
- Converts generic PHP errors to \ErrorException instances, before passing them off to be handled.
- handleException() : string
- Handles an exception, ultimately generating a Whoops error page.
- handleShutdown() : void
- Special case to deal with Fatal errors and the like.
- popHandler() : HandlerInterface|null
- Removes and returns the last handler pushed to the handler stack.
- prependHandler() : Run
- Explicitly request your handler runs as the first of all currently registered handlers.
- pushHandler() : Run
- Register your handler as the last of all currently registered handlers (to be executed first).
- register() : Run
- Registers this instance as an error handler.
- removeFirstHandler() : void
- Removes the first handler.
- removeLastHandler() : void
- Removes the last handler.
- sendExitCode() : int
- Should Whoops exit with a specific code on the CLI if possible? Whoops will exit with 1 by default, but you can specify something else.
- sendHttpCode() : int|false
- Should Whoops send HTTP error code to the browser if possible? Whoops will by default send HTTP code 500, but you may wish to use 502, 503, or another 5xx family code.
- silenceErrorsInPaths() : Run
- Silence particular errors in particular files.
- unregister() : Run
- Unregisters all handlers registered by this Whoops\Run instance.
- writeToOutput() : bool
- Should Whoops push output directly to the client? If this is false, output will be returned by handleException.
- getInspector() : Inspector
- resolveHandler() : HandlerInterface
- Resolves the giving handler.
- writeToOutputNow() : Run
- Echo something to the browser.
Properties
$allowQuit
    private
        bool
    $allowQuit
     = true
    
    
    
    
$canThrowExceptions
In certain scenarios, like in shutdown handler, we can not throw exceptions.
    private
        bool
    $canThrowExceptions
     = true
    
    
    
    
$handlerStack
    private
        array<string|int, HandlerInterface>
    $handlerStack
     = []
    
    
    
    
$isRegistered
    private
        bool
    $isRegistered
    
    
    
    
    
$sendExitCode
    private
        int|false
    $sendExitCode
     = 1
    
    
    
    
$sendHttpCode
    private
        int|false
    $sendHttpCode
     = 500
    
    
    
    
$sendOutput
    private
        bool
    $sendOutput
     = true
    
    
    
    
$silencedPatterns
    private
        array<string|int, mixed>
    $silencedPatterns
     = []
    
    
    
    Tags
$system
    private
        SystemFacade
    $system
    
    
    
    
    
Methods
__construct()
    public
                    __construct([SystemFacade|null $system = null ]) : mixed
    Parameters
- $system : SystemFacade|null = null
allowQuit()
Should Whoops allow Handlers to force the script to quit?
    public
                    allowQuit([bool|int $exit = null ]) : bool
    Parameters
- $exit : bool|int = null
Return values
boolappendHandler()
Explicitly request your handler runs as the last of all currently registered handlers.
    public
                    appendHandler(HandlerInterface $handler) : Run
    Parameters
- $handler : HandlerInterface
Return values
RunclearHandlers()
Clears all handlers in the handlerStack, including the default PrettyPage handler.
    public
                    clearHandlers() : Run
    Return values
RungetHandlers()
Returns an array with all handlers, in the order they were added to the stack.
    public
                    getHandlers() : array<string|int, mixed>
    Return values
array<string|int, mixed>getSilenceErrorsInPaths()
Returns an array with silent errors in path configuration.
    public
                    getSilenceErrorsInPaths() : array<string|int, mixed>
    Return values
array<string|int, mixed>handleError()
Converts generic PHP errors to \ErrorException instances, before passing them off to be handled.
    public
                    handleError(int $level, string $message[, string|null $file = null ][, int|null $line = null ]) : bool
    This method MUST be compatible with set_error_handler.
Parameters
- $level : int
- $message : string
- $file : string|null = null
- $line : int|null = null
Tags
Return values
boolhandleException()
Handles an exception, ultimately generating a Whoops error page.
    public
                    handleException(Throwable $exception) : string
    Parameters
- $exception : Throwable
Return values
string —Output generated by handlers.
handleShutdown()
Special case to deal with Fatal errors and the like.
    public
                    handleShutdown() : void
    popHandler()
Removes and returns the last handler pushed to the handler stack.
    public
                    popHandler() : HandlerInterface|null
    Tags
Return values
HandlerInterface|nullprependHandler()
Explicitly request your handler runs as the first of all currently registered handlers.
    public
                    prependHandler(HandlerInterface $handler) : Run
    Parameters
- $handler : HandlerInterface
Return values
RunpushHandler()
Register your handler as the last of all currently registered handlers (to be executed first).
    public
                    pushHandler(callable|HandlerInterface $handler) : Run
    Prefer using appendHandler and prependHandler for clarity.
Parameters
- $handler : callable|HandlerInterface
Tags
Return values
Runregister()
Registers this instance as an error handler.
    public
                    register() : Run
    Return values
RunremoveFirstHandler()
Removes the first handler.
    public
                    removeFirstHandler() : void
    removeLastHandler()
Removes the last handler.
    public
                    removeLastHandler() : void
    sendExitCode()
Should Whoops exit with a specific code on the CLI if possible? Whoops will exit with 1 by default, but you can specify something else.
    public
                    sendExitCode([int $code = null ]) : int
    Parameters
- $code : int = null
Tags
Return values
intsendHttpCode()
Should Whoops send HTTP error code to the browser if possible? Whoops will by default send HTTP code 500, but you may wish to use 502, 503, or another 5xx family code.
    public
                    sendHttpCode([bool|int $code = null ]) : int|false
    Parameters
- $code : bool|int = null
Tags
Return values
int|falsesilenceErrorsInPaths()
Silence particular errors in particular files.
    public
                    silenceErrorsInPaths(array<string|int, mixed>|string $patterns[, int $levels = 10240 ]) : Run
    Parameters
- $patterns : array<string|int, mixed>|string
- 
                    List or a single regex pattern to match. 
- $levels : int = 10240
- 
                    Defaults to E_STRICT | E_DEPRECATED. 
Return values
Rununregister()
Unregisters all handlers registered by this Whoops\Run instance.
    public
                    unregister() : Run
    Return values
RunwriteToOutput()
Should Whoops push output directly to the client? If this is false, output will be returned by handleException.
    public
                    writeToOutput([bool|int $send = null ]) : bool
    Parameters
- $send : bool|int = null
Return values
boolgetInspector()
    private
                    getInspector(Throwable $exception) : Inspector
    Parameters
- $exception : Throwable
Return values
InspectorresolveHandler()
Resolves the giving handler.
    private
                    resolveHandler(HandlerInterface $handler) : HandlerInterface
    Parameters
- $handler : HandlerInterface
Tags
Return values
HandlerInterfacewriteToOutputNow()
Echo something to the browser.
    private
                    writeToOutputNow(string $output) : Run
    Parameters
- $output : string