PHP Class Cassandra\Timestamp

Inheritance: implements cassandra\Value
Afficher le fichier Open project: datastax/php-driver

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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() public méthode

Returns a string representation of this timestamp.
public __toString ( ) : string
Résultat string timestamp

microtime() public méthode

Microtime from this timestamp
See also: microtime
public microtime ( boolean $get_as_float = false ) : float | string
$get_as_float boolean Whether to get this value as float
Résultat float | string Float or string representation

time() public méthode

Unix timestamp.
See also: time
public time ( ) : integer
Résultat integer seconds

toDateTime() public méthode

Converts current timestamp to PHP DateTime.
public toDateTime ( ) : DateTime
Résultat DateTime PHP representation

type() public méthode

The type of this timestamp.
public type ( ) : cassandra\Type
Résultat cassandra\Type