PHP Class Airbrake\Client

Author: Drew Butler ([email protected])
Show file Open project: dbtlr/php-airbrake Class Usage Examples

Protected Properties

Property Type Description
$configuration Configuration | null
$connection Connection | null
$notice null

Public Methods

Method Description
__construct ( Configuration $configuration ) Build the Client with the Airbrake Configuration.
getConfiguration ( ) : Configuration
notify ( airbrake\Notice $notice ) : string | boolean Notify about the notice.
notifyOnError ( string $message, array $backtrace = null, null $extraParams = null ) : string Notify on an error message.
notifyOnException ( Exception $e, null $extraParams = null ) : string Notify on an exception
setConnection ( Airbrake\Connection\ConnectionInterface $connection ) : self Override the default Connection

Protected Methods

Method Description
cleanBacktrace ( array $backtrace ) : array Clean the backtrace of unneeded junk.
cleanFilePath ( $filePath )

Method Details

__construct() public method

Build the Client with the Airbrake Configuration.
public __construct ( Configuration $configuration )
$configuration Configuration

cleanBacktrace() protected method

Clean the backtrace of unneeded junk.
protected cleanBacktrace ( array $backtrace ) : array
$backtrace array
return array

cleanFilePath() protected method

protected cleanFilePath ( $filePath )

getConfiguration() public method

public getConfiguration ( ) : Configuration
return Configuration

notify() public method

Notify about the notice.
public notify ( airbrake\Notice $notice ) : string | boolean
$notice airbrake\Notice
return string | boolean

notifyOnError() public method

Notify on an error message.
public notifyOnError ( string $message, array $backtrace = null, null $extraParams = null ) : string
$message string
$backtrace array
$extraParams null
return string

notifyOnException() public method

Notify on an exception
public notifyOnException ( Exception $e, null $extraParams = null ) : string
$e Exception
$extraParams null
return string

setConnection() public method

Override the default Connection
public setConnection ( Airbrake\Connection\ConnectionInterface $connection ) : self
$connection Airbrake\Connection\ConnectionInterface
return self

Property Details

$configuration protected property

protected Configuration,airbrake|null $configuration
return Configuration | null

$connection protected property

protected Connection,airbrake|null $connection
return Connection | null

$notice protected property

protected null $notice
return null