PHP Class Tylercd100\LERN\LERN

Mostra file Open project: tylercd100/lern

Public Methods

Method Description
__construct ( Notifier $notifier = null, Recorder $recorder = null )
getNotifier ( ) : Notifier Get Notifier
getRecorder ( ) : Recorder Get Recorder
handle ( Exception $e ) : ExceptionModel Will execute record and notify methods
notify ( Exception $e ) : void Will send the exception to all monolog handlers
pushHandler ( Monolog\Handler\HandlerInterface $handler ) Pushes on another Monolog Handler
record ( Exception $e ) : ExceptionModel | false Stores the exception in the database
setMessage ( function | string $cb ) Set a string or a closure to be called that will generate the message body for the notification
setNotifier ( Notifier $notifier ) : LERN Set Notifier
setRecorder ( Recorder $recorder ) : LERN Set Recorder
setSubject ( function | string $cb ) Set a string or a closure to be called that will generate the subject line for the notification

Method Details

__construct() public method

public __construct ( Notifier $notifier = null, Recorder $recorder = null )
$notifier Tylercd100\LERN\Components\Notifier Notifier instance
$recorder Tylercd100\LERN\Components\Recorder Recorder instance

getNotifier() public method

Get Notifier
public getNotifier ( ) : Notifier
return Tylercd100\LERN\Components\Notifier

getRecorder() public method

Get Recorder
public getRecorder ( ) : Recorder
return Tylercd100\LERN\Components\Recorder

handle() public method

Will execute record and notify methods
public handle ( Exception $e ) : ExceptionModel
$e Exception The exception to use
return ExceptionModel the recorded Eloquent Model

notify() public method

Will send the exception to all monolog handlers
public notify ( Exception $e ) : void
$e Exception The exception to use
return void

pushHandler() public method

Pushes on another Monolog Handler
public pushHandler ( Monolog\Handler\HandlerInterface $handler )
$handler Monolog\Handler\HandlerInterface The handler instance to add on

record() public method

Stores the exception in the database
public record ( Exception $e ) : ExceptionModel | false
$e Exception The exception to use
return Tylercd100\LERN\Models\ExceptionModel | false The recorded Exception as an Eloquent Model

setMessage() public method

Set a string or a closure to be called that will generate the message body for the notification
public setMessage ( function | string $cb )
$cb function | string This closure function will be passed an Exception and must return a string

setNotifier() public method

Set Notifier
public setNotifier ( Notifier $notifier ) : LERN
$notifier Tylercd100\LERN\Components\Notifier A Notifier instance to use
return LERN

setRecorder() public method

Set Recorder
public setRecorder ( Recorder $recorder ) : LERN
$recorder Tylercd100\LERN\Components\Recorder A Recorder instance to use
return LERN

setSubject() public method

Set a string or a closure to be called that will generate the subject line for the notification
public setSubject ( function | string $cb )
$cb function | string This closure function will be passed an Exception and must return a string