PHP Class Kahlan\Plugin\Call\Calls

Afficher le fichier Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Свойство Type Description
$_index array Current index of logged calls per reference.
$_logs array Logged calls.

Méthodes publiques

Méthode Description
_call ( object | string $reference, string $call ) Helper for the log() method.
find ( object $message, integer $index, $times ) : array | false Finds a logged call.
lastFindIndex ( integer $index = null ) : integer Gets/sets the find index
log ( mixed $reference, string $call ) Logs a call.
logs ( object | string $reference = null, integer $index ) : array Get all logs or all logs related to an instance or a fully-namespaced class name.
reset ( ) Clears the registered references & logs.

Méthodes protégées

Méthode Description
_matchReference ( object | string $reference, array $logs = [] ) : array Helper for the _findAll() method.

Method Details

_call() public static méthode

Helper for the log() method.
public static _call ( object | string $reference, string $call )
$reference object | string An instance or a fully-namespaced class name.
$call string The method name.

_matchReference() protected static méthode

Helper for the _findAll() method.
protected static _matchReference ( object | string $reference, array $logs = [] ) : array
$reference object | string An instance or a fully-namespaced class name.
$logs array The logged calls.
Résultat array The founded log call.

find() public static méthode

Finds a logged call.
public static find ( object $message, integer $index, $times ) : array | false
$message object The message method name.
$index integer Start index.
Résultat array | false Return founded log call.

lastFindIndex() public static méthode

Gets/sets the find index
public static lastFindIndex ( integer $index = null ) : integer
$index integer The index value to set or `null` to get the current one.
Résultat integer Return founded log call.

log() public static méthode

Logs a call.
public static log ( mixed $reference, string $call )
$reference mixed An instance or a fully-namespaced class name or an array of them.
$call string The method name.

logs() public static méthode

Get all logs or all logs related to an instance or a fully-namespaced class name.
public static logs ( object | string $reference = null, integer $index ) : array
$reference object | string An instance or a fully-namespaced class name.
$index integer Start index.
Résultat array The founded log calls.

reset() public static méthode

Clears the registered references & logs.
public static reset ( )

Property Details

$_index protected_oe static_oe property

Current index of logged calls per reference.
protected static array $_index
Résultat array

$_logs protected_oe static_oe property

Logged calls.
protected static array $_logs
Résultat array