PHP Class kahlan\Reporters

Afficher le fichier Open project: crysalead/kahlan

Protected Properties

Свойство Type Description
$_reporters array The registered reporters.

Méthodes publiques

Méthode 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 méthode

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

clear() public méthode

Removes all reporters.
public clear ( )

dispatch() public méthode

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

exists() public méthode

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

get() public méthode

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

remove() public méthode

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

Property Details

$_reporters protected_oe property

The registered reporters.
protected array $_reporters
Résultat array