PHP Интерфейс Eloquent\Phony\Call\Call

Наследование: extends Eloquent\Phony\Event\Event, extends Eloquent\Phony\Event\EventCollection
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
addIterableEvent ( Eloquent\Phony\Call\Event\IterableEvent $iterableEvent ) Add an iterable event.
argument ( integer $index ) : mixed Get an argument by index.
arguments ( ) : Arguments | null Get the arguments.
callback ( ) : callable Get the callback.
calledEvent ( ) : CalledEvent Get the 'called' event.
endEvent ( ) : Eloquent\Phony\Call\Event\EndEvent | null Get the end event.
endTime ( ) : float | null Get the time at which the call completed.
exception ( ) : Exceptio\Exception | Erro\Error Get the thrown exception.
generatorException ( ) : Exceptio\Exception | Erro\Error Get the exception thrown from the generator.
generatorResponse ( ) : tuple\null Get the response from the generator.
generatorReturnValue ( ) : mixed Get the value returned from the generator.
hasCompleted ( ) : boolean Returns true if this call has completed.
hasResponded ( ) : boolean Returns true if this call has responded.
index ( ) : integer Get the call index.
isGenerator ( ) : boolean Returns true if this call has responded with a generator.
isIterable ( ) : boolean Returns true if this call has responded with an iterable.
iterableEvents ( ) : array Get the iterable events.
response ( ) : tuple\null Get the response.
responseEvent ( ) : Eloquent\Phony\Call\Event\ResponseEvent | null Get the response event.
responseTime ( ) : float | null Get the time at which the call responded.
returnValue ( ) : mixed Get the returned value.
setEndEvent ( Eloquent\Phony\Call\Event\EndEvent $endEvent ) Set the end event.
setResponseEvent ( Eloquent\Phony\Call\Event\ResponseEvent $responseEvent ) Set the response event.

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

addIterableEvent() публичный Метод

Add an iterable event.
public addIterableEvent ( Eloquent\Phony\Call\Event\IterableEvent $iterableEvent )
$iterableEvent Eloquent\Phony\Call\Event\IterableEvent The iterable event.

argument() публичный Метод

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element.
public argument ( integer $index ) : mixed
$index integer The index.
Результат mixed The argument.

arguments() публичный Метод

Get the arguments.
public arguments ( ) : Arguments | null
Результат Arguments | null The arguments.

callback() публичный Метод

Get the callback.
public callback ( ) : callable
Результат callable The callback.

calledEvent() публичный Метод

Get the 'called' event.
public calledEvent ( ) : CalledEvent
Результат Eloquent\Phony\Call\Event\CalledEvent The 'called' event.

endEvent() публичный Метод

Get the end event.
public endEvent ( ) : Eloquent\Phony\Call\Event\EndEvent | null
Результат Eloquent\Phony\Call\Event\EndEvent | null The end event, or null if the call has not yet completed.

endTime() публичный Метод

When generator spies are in use, a call that returns a generator will not be considered complete until the generator has been completely consumed via iteration. Similarly, when iterable spies are in use, a call that returns an iterable will not be considered complete until the iterable has been completely consumed via iteration.
public endTime ( ) : float | null
Результат float | null The time at which the call completed, in seconds since the Unix epoch, or null if the call has not yet completed.

exception() публичный Метод

Get the thrown exception.
public exception ( ) : Exceptio\Exception | Erro\Error
Результат Exceptio\Exception | Erro\Error The thrown exception.

generatorException() публичный Метод

Get the exception thrown from the generator.
public generatorException ( ) : Exceptio\Exception | Erro\Error
Результат Exceptio\Exception | Erro\Error The thrown exception.

generatorResponse() публичный Метод

Get the response from the generator.
public generatorResponse ( ) : tuple\null
Результат tuple\null

generatorReturnValue() публичный Метод

Get the value returned from the generator.
public generatorReturnValue ( ) : mixed
Результат mixed The returned value.

hasCompleted() публичный Метод

When generator spies are in use, a call that returns a generator will not be considered complete until the generator has been completely consumed via iteration. Similarly, when iterable spies are in use, a call that returns an iterable will not be considered complete until the iterable has been completely consumed via iteration.
public hasCompleted ( ) : boolean
Результат boolean True if this call has completed.

hasResponded() публичный Метод

A call that has responded has returned a value, or thrown an exception.
public hasResponded ( ) : boolean
Результат boolean True if this call has responded.

index() публичный Метод

This number tracks the order of this call with respect to other calls made against the same spy.
public index ( ) : integer
Результат integer The index.

isGenerator() публичный Метод

Returns true if this call has responded with a generator.
public isGenerator ( ) : boolean
Результат boolean True if this call has responded with a generator.

isIterable() публичный Метод

Returns true if this call has responded with an iterable.
public isIterable ( ) : boolean
Результат boolean True if this call has responded with an iterable.

iterableEvents() публичный Метод

Get the iterable events.
public iterableEvents ( ) : array
Результат array

response() публичный Метод

Get the response.
public response ( ) : tuple\null
Результат tuple\null

responseEvent() публичный Метод

Get the response event.
public responseEvent ( ) : Eloquent\Phony\Call\Event\ResponseEvent | null
Результат Eloquent\Phony\Call\Event\ResponseEvent | null The response event, or null if the call has not yet responded.

responseTime() публичный Метод

A call that has responded has returned a value, or thrown an exception.
public responseTime ( ) : float | null
Результат float | null The time at which the call responded, in seconds since the Unix epoch, or null if the call has not yet responded.

returnValue() публичный Метод

Get the returned value.
public returnValue ( ) : mixed
Результат mixed The returned value.

setEndEvent() публичный Метод

Set the end event.
public setEndEvent ( Eloquent\Phony\Call\Event\EndEvent $endEvent )
$endEvent Eloquent\Phony\Call\Event\EndEvent The end event.

setResponseEvent() публичный Метод

Set the response event.
public setResponseEvent ( Eloquent\Phony\Call\Event\ResponseEvent $responseEvent )
$responseEvent Eloquent\Phony\Call\Event\ResponseEvent The response event.