PHP Class Services_Hoptoad, php-hoptoad-notifier

Afficher le fichier Open project: rich/php-hoptoad-notifier Class Usage Examples

Méthodes publiques

Свойство Type Description
$apiKey mixed
$client
$environment string

Protected Properties

Свойство Type Description
$error_class
$file
$line
$message
$reportESTRICT boolean Report E_STRICT
$timeout integer Timeout for cUrl.
$trace

Méthodes publiques

Méthode Description
__construct ( string $apiKey, string $environment = 'production', string $client = 'pear', string $reportESTRICT = false, integer $timeout = 2 ) : void Initialize the Hoptad client
action ( ) : mixed action
addXmlBacktrace ( $parent ) : void Add a Hoptoad backtrace to the XML
addXmlVars ( $parent, $key, $source ) : void Add a Hoptoad var block to the XML
buildXmlNotice ( ) : string Build up the XML to post according to the documentation at: http://help.hoptoadapp.com/faqs/api-2/notifier-api-v2
cgi_data ( ) : array cgi_data
component ( ) : mixed component
curlRequest ( $url, $headers, $body ) : integer Send the request to Hoptoad using Curl
environment ( ) : string environment
errorHandler ( string $code, string $message, string $file, string $line ) : void Handle a php error
exceptionHandler ( Exception $exception ) : void Handle a raised exception
installHandlers ( $apiKey = NULL, $environment = NULL, $client = NULL, $class = 'Services_Hoptoad' ) : void Initialize the chosen notifier and install the error and exception handlers that connect to Hoptoad
installNotifierHandlers ( ) : void Hook's this notifier to PHP error and exception handlers
notify ( mixed $error_class, string $message, string $file, string $line, array $trace, $component = NULL ) Pass the error and environment data on to Hoptoad
params ( ) : array params
pearRequest ( $url, $headers, $body ) : integer Send the request to Hoptoad using PEAR
project_root ( ) : string project_root
request_uri ( ) : string get the request uri
session ( ) : array session
setParamsForNotify ( $error_class, $message, $file, $line, $trace, $component = NULL ) : void Set the values to be used for the next notice sent to Hoptoad
setup ( ) : void A method meant specifically for subclasses to override so they don't need to handle the constructor
zendRequest ( $url, $headers, $body ) : integer Send the request to Hoptoad using Zend

Méthodes protégées

Méthode Description
handleErrorResponse ( mixed $code ) : void

Method Details

__construct() public méthode

Initialize the Hoptad client
Author: Rich Cavanaugh
public __construct ( string $apiKey, string $environment = 'production', string $client = 'pear', string $reportESTRICT = false, integer $timeout = 2 ) : void
$apiKey string
$environment string
$client string
$reportESTRICT string
$timeout integer
Résultat void

action() public méthode

action
Author: Scott Woods
public action ( ) : mixed
Résultat mixed

addXmlBacktrace() public méthode

Add a Hoptoad backtrace to the XML
Author: Rich Cavanaugh
public addXmlBacktrace ( $parent ) : void
Résultat void

addXmlVars() public méthode

Add a Hoptoad var block to the XML
Author: Rich Cavanaugh
public addXmlVars ( $parent, $key, $source ) : void
Résultat void

buildXmlNotice() public méthode

Build up the XML to post according to the documentation at: http://help.hoptoadapp.com/faqs/api-2/notifier-api-v2
Author: Rich Cavanaugh
public buildXmlNotice ( ) : string
Résultat string

cgi_data() public méthode

cgi_data
Author: Scott Woods
public cgi_data ( ) : array
Résultat array

component() public méthode

component
Author: Scott Woods
public component ( ) : mixed
Résultat mixed

curlRequest() public méthode

Send the request to Hoptoad using Curl
Author: Rich Cavanaugh
public curlRequest ( $url, $headers, $body ) : integer
Résultat integer

environment() public méthode

environment
Author: Rich Cavanaugh
public environment ( ) : string
Résultat string

errorHandler() public méthode

Handle a php error
Author: Rich Cavanaugh
public errorHandler ( string $code, string $message, string $file, string $line ) : void
$code string
$message string
$file string
$line string
Résultat void

exceptionHandler() public méthode

Handle a raised exception
Author: Rich Cavanaugh
public exceptionHandler ( Exception $exception ) : void
$exception Exception
Résultat void

handleErrorResponse() protected méthode

protected handleErrorResponse ( mixed $code ) : void
$code mixed The HTTP status code from Hoptoad.
Résultat void

installHandlers() public static méthode

Initialize the chosen notifier and install the error and exception handlers that connect to Hoptoad
Author: Rich Cavanaugh
public static installHandlers ( $apiKey = NULL, $environment = NULL, $client = NULL, $class = 'Services_Hoptoad' ) : void
Résultat void

installNotifierHandlers() public méthode

Hook's this notifier to PHP error and exception handlers
Author: Rich Cavanaugh
public installNotifierHandlers ( ) : void
Résultat void

notify() public méthode

Pass the error and environment data on to Hoptoad
Author: Rich Cavanaugh
public notify ( mixed $error_class, string $message, string $file, string $line, array $trace, $component = NULL )
$error_class mixed
$message string
$file string
$line string
$trace array

params() public méthode

params
Author: Scott Woods
public params ( ) : array
Résultat array

pearRequest() public méthode

Send the request to Hoptoad using PEAR
Author: Rich Cavanaugh
public pearRequest ( $url, $headers, $body ) : integer
Résultat integer

project_root() public méthode

project_root
Author: Scott Woods
public project_root ( ) : string
Résultat string

request_uri() public méthode

get the request uri
Author: Scott Woods
public request_uri ( ) : string
Résultat string

session() public méthode

session
Author: Scott Woods
public session ( ) : array
Résultat array

setParamsForNotify() public méthode

Set the values to be used for the next notice sent to Hoptoad
Author: Rich Cavanaugh
public setParamsForNotify ( $error_class, $message, $file, $line, $trace, $component = NULL ) : void
Résultat void

setup() public méthode

A method meant specifically for subclasses to override so they don't need to handle the constructor
Author: Rich Cavanaugh
public setup ( ) : void
Résultat void

zendRequest() public méthode

Send the request to Hoptoad using Zend
Author: Rich Cavanaugh
public zendRequest ( $url, $headers, $body ) : integer
Résultat integer

Property Details

$apiKey public_oe property

public mixed $apiKey
Résultat mixed

$client public_oe property

public $client

$environment public_oe property

public string $environment
Résultat string

$error_class protected_oe property

protected $error_class

$file protected_oe property

protected $file

$line protected_oe property

protected $line

$message protected_oe property

protected $message

$reportESTRICT protected_oe property

Report E_STRICT
protected bool $reportESTRICT
Résultat boolean

$timeout protected_oe property

Timeout for cUrl.
protected int $timeout
Résultat integer

$trace protected_oe property

protected $trace