PHP Класс Cassandra\Timestamp

Наследование: implements cassandra\Value
Показать файл Открыть проект

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

Метод Описание
__construct ( integer $time = null, integer $usec = null ) Creates a new timestamp from either unix timestamp and microseconds or from the current time by default.
__toString ( ) : string Returns a string representation of this timestamp.
microtime ( boolean $get_as_float = false ) : float | string Microtime from this timestamp
time ( ) : integer Unix timestamp.
toDateTime ( ) : DateTime Converts current timestamp to PHP DateTime.
type ( ) : cassandra\Type The type of this timestamp.

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

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

Creates a new timestamp from either unix timestamp and microseconds or from the current time by default.
public __construct ( integer $time = null, integer $usec = null )
$time integer Unix timestamp
$usec integer Microseconds

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

Returns a string representation of this timestamp.
public __toString ( ) : string
Результат string timestamp

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

Microtime from this timestamp
См. также: microtime
public microtime ( boolean $get_as_float = false ) : float | string
$get_as_float boolean Whether to get this value as float
Результат float | string Float or string representation

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

Unix timestamp.
См. также: time
public time ( ) : integer
Результат integer seconds

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

Converts current timestamp to PHP DateTime.
public toDateTime ( ) : DateTime
Результат DateTime PHP representation

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

The type of this timestamp.
public type ( ) : cassandra\Type
Результат cassandra\Type