PHP Class kahlan\Reporters

Datei anzeigen Open project: crysalead/kahlan

Protected Properties

Property Type Description
$_reporters array The registered reporters.

Public Methods

Method Description
add ( string $name, object $reporter ) : object | boolean Adds a reporter
clear ( ) Removes all reporters.
dispatch ( string $type, array $data = null ) Sends reports
exists ( string $name ) : boolean Checks if a reporter exist.
get ( string $name ) : mixed Gets a reporter
remove ( string $name ) Removes a reporter.

Method Details

add() public method

Adds a reporter
public add ( string $name, object $reporter ) : object | boolean
$name string The reporter name.
$reporter object A reporter.
return object | boolean The added reporter instance or `false` on failure.

clear() public method

Removes all reporters.
public clear ( )

dispatch() public method

Sends reports
public dispatch ( string $type, array $data = null )
$type string The name of the report.
$data array The data to report.

exists() public method

Checks if a reporter exist.
public exists ( string $name ) : boolean
$name string The reporter name.
return boolean

get() public method

Gets a reporter
public get ( string $name ) : mixed
$name string The reporter name.
return mixed The reporter or `null` if not found.

remove() public method

Removes a reporter.
public remove ( string $name )
$name string The reporter name.

Property Details

$_reporters protected_oe property

The registered reporters.
protected array $_reporters
return array