PHP Класс phpmock\functions\AbstractSleepFunction

Автор: Markus Malkusch ([email protected])
Наследование: implements phpmock\functions\FunctionProvider
Показать файл Открыть проект

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

Метод Описание
__construct ( array $incrementables = [] ) Sets the Incrementable objects.
addIncrementable ( phpmock\functions\Incrementable $incrementable ) Adds an Incrementable object.
getCallable ( ) : callable Returns the sleep() mock function.

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

Метод Описание
convertToSeconds ( integer $amount ) : mixed Converts the sleep() parameter into seconds.

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

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

Sets the Incrementable objects.
См. также: addIncrementable()
public __construct ( array $incrementables = [] )
$incrementables array Observing Incrementables.

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

These objects are observing this function and get notified by increasing the amount of passed time. Incrementables are used for time() and microtime() mocks.
public addIncrementable ( phpmock\functions\Incrementable $incrementable )
$incrementable phpmock\functions\Incrementable Observing Incrementable.

convertToSeconds() абстрактный защищенный Метод

Converts the sleep() parameter into seconds.
abstract protected convertToSeconds ( integer $amount ) : mixed
$amount integer Amount of time units.
Результат mixed Seconds.

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

A call will increase all registered Increment objects.
public getCallable ( ) : callable
Результат callable The callable for this object.