PHP Class Cassandra\Timeuuid

Inheritance: implements cassandra\UuidInterface
Show file Open project: datastax/php-driver

Public Methods

Method Description
__construct ( integer $timestamp = null ) Creates a timeuuid from a given timestamp or current time.
__toString ( ) : string Returns this timeuuid as string.
time ( ) : integer Unix timestamp.
toDateTime ( ) : DateTime Converts current timeuuid to PHP DateTime.
type ( ) : cassandra\Type The type of this timeuuid.
uuid ( ) : string Returns this timeuuid as string.
version ( ) : integer Returns the version of this timeuuid.

Method Details

__construct() public method

Creates a timeuuid from a given timestamp or current time.
public __construct ( integer $timestamp = null )
$timestamp integer Unix timestamp

__toString() public method

Returns this timeuuid as string.
public __toString ( ) : string
return string timeuuid

time() public method

Unix timestamp.
See also: time
public time ( ) : integer
return integer seconds

toDateTime() public method

Converts current timeuuid to PHP DateTime.
public toDateTime ( ) : DateTime
return DateTime PHP representation

type() public method

The type of this timeuuid.
public type ( ) : cassandra\Type
return cassandra\Type

uuid() public method

Returns this timeuuid as string.
public uuid ( ) : string
return string timeuuid

version() public method

Returns the version of this timeuuid.
public version ( ) : integer
return integer version of this timeuuid