PHP Класс SimpleSignatureMap, simpletest

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

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

Метод Описание
__construct ( ) Creates an empty call map.
add ( array $parameters, mixed $action ) Stashes a reference against a method call.
findFirstAction ( array $parameters ) : object Searches the call list for a matching parameter set. Returned by reference.
findFirstSlot ( array $parameters ) : array Searches the map for a matching item.
isMatch ( array $parameters ) : boolean Searches the call list for a matching parameter set. True if successful.
test ( SimpleTestCase $test, array $parameters, string $message ) Compares the incoming parameters with the internal expectation.

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

__construct() публичный метод

Creates an empty call map.
public __construct ( )

add() публичный метод

Stashes a reference against a method call.
public add ( array $parameters, mixed $action )
$parameters array Array of arguments (including wildcards).
$action mixed Reference placed in the map.

findFirstAction() публичный метод

Searches the call list for a matching parameter set. Returned by reference.
public findFirstAction ( array $parameters ) : object
$parameters array Parameters to search by without wildcards.
Результат object Object held in the first matching slot, otherwise null.

findFirstSlot() публичный метод

Searches the map for a matching item.
public findFirstSlot ( array $parameters ) : array
$parameters array Parameters to search by without wildcards.
Результат array Reference to slot or null.

isMatch() публичный метод

Searches the call list for a matching parameter set. True if successful.
public isMatch ( array $parameters ) : boolean
$parameters array Parameters to search by without wildcards.
Результат boolean True if a match is present.

test() публичный метод

Uses the incoming $test to dispatch the test message.
public test ( SimpleTestCase $test, array $parameters, string $message )
$test SimpleTestCase Test to dispatch to.
$parameters array The actual calling arguments.
$message string The message to overlay.