PHP Класс phpmock\functions\FixedMicrotimeFunction

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

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

Метод Описание
__construct ( mixed $timestamp = null ) Set the timestamp.
getCallable ( ) : callable Returns this object as a callable for the mock function.
getMicrotime ( boolean $get_as_float = false ) : mixed Returns the microtime.
getTime ( ) : integer Returns the time without the microseconds.
increment ( $increment )
setMicrotime ( string $timestamp ) Set the timestamp as string.
setMicrotimeAsFloat ( float $timestamp ) Set the timestamp as float.

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

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

Set the timestamp.
public __construct ( mixed $timestamp = null )
$timestamp mixed The timestamp, if ommited the current time.

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

Returns this object as a callable for the mock function.
public getCallable ( ) : callable
Результат callable The callable for this object.

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

Returns the microtime.
public getMicrotime ( boolean $get_as_float = false ) : mixed
$get_as_float boolean If true returns timestamp as float, else string
Результат mixed The value.

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

Returns the time without the microseconds.
public getTime ( ) : integer
Результат integer The time.

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

public increment ( $increment )

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

Set the timestamp as string.
public setMicrotime ( string $timestamp )
$timestamp string The timestamp as string.

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

Set the timestamp as float.
public setMicrotimeAsFloat ( float $timestamp )
$timestamp float The timestamp as float.