PHP 클래스 Kahlan\Plugin\Call\Calls

파일 보기 프로젝트 열기: crysalead/kahlan 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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