PHP Class Kahlan\Plugin\Call\Calls

Datei anzeigen Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Property Type Description
$_index array Current index of logged calls per reference.
$_logs array Logged calls.

Public Methods

Method 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.

Protected Methods

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

Method Details

_call() public static method

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 method

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.
return array The founded log call.

find() public static method

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

lastFindIndex() public static method

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.
return integer Return founded log call.

log() public static method

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 method

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.
return array The founded log calls.

reset() public static method

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
return array

$_logs protected_oe static_oe property

Logged calls.
protected static array $_logs
return array