PHP Класс Kahlan\Plugin\Call\Calls

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_index array Current index of logged calls per reference.
$_logs array Logged calls.

Открытые методы

Метод Описание
_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.

Защищенные методы

Метод Описание
_matchReference ( object | string $reference, array $logs = [] ) : array Helper for the _findAll() method.

Описание методов

_call() публичный статический Метод

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() защищенный статический Метод

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.
Результат array The founded log call.

find() публичный статический Метод

Finds a logged call.
public static find ( object $message, integer $index, $times ) : array | false
$message object The message method name.
$index integer Start index.
Результат array | false Return founded log call.

lastFindIndex() публичный статический Метод

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.
Результат integer Return founded log call.

log() публичный статический Метод

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() публичный статический Метод

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.
Результат array The founded log calls.

reset() публичный статический Метод

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

Описание свойств

$_index защищенное статическое свойство

Current index of logged calls per reference.
protected static array $_index
Результат array

$_logs защищенное статическое свойство

Logged calls.
protected static array $_logs
Результат array