PHP Class evseevnn\Cassandra\Protocol\Response\DataStream

Afficher le fichier Open project: evseevnn/php-cassandra-binary Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $binary )
readBigInt ( $isCollectionElement = false ) : int; Read unsigned big int;
readBoolean ( ) : boolean Read boolean.
readByType ( array $type, boolean $isCollectionElement = false ) : mixed
readBytes ( boolean $isCollectionElement = false ) : string Read bytes.
readChar ( ) : integer Read single character.
readDecimal ( boolean $isCollectionElement = false ) : string Read variable length decimal.
readDouble ( boolean $isCollectionElement = false ) : double Read double.
readFloat ( boolean $isCollectionElement = false ) : float Read float.
readInet ( boolean $isCollectionElement = false ) : string Read inet.
readInt ( boolean $isCollectionElement = false ) : integer Read unsigned int.
readList ( $valueType ) : array Read list.
readLongString ( ) : string Read long string.
readMap ( $keyType, $valueType ) : array Read map.
readShort ( ) : integer Read unsigned short.
readString ( ) : string Read string.
readTimestamp ( ) : integer Read timestamp.
readUuid ( boolean $isCollectionElement = false ) : string Read uuid.
readVarint ( boolean $isCollectionElement = false ) : string Read variable length integer.

Méthodes protégées

Méthode Description
read ( integer $length ) : string Read data from stream.

Private Methods

Méthode Description
bchexdec ( string $hex ) : string

Method Details

__construct() public méthode

public __construct ( string $binary )
$binary string

read() protected méthode

Read data from stream.
protected read ( integer $length ) : string
$length integer
Résultat string

readBigInt() public méthode

Read unsigned big int;
public readBigInt ( $isCollectionElement = false ) : int;
Résultat int;

readBoolean() public méthode

Read boolean.
public readBoolean ( ) : boolean
Résultat boolean

readByType() public méthode

public readByType ( array $type, boolean $isCollectionElement = false ) : mixed
$type array
$isCollectionElement boolean for collection element used other alg. a temporary solution
Résultat mixed

readBytes() public méthode

Read bytes.
public readBytes ( boolean $isCollectionElement = false ) : string
$isCollectionElement boolean
Résultat string

readChar() public méthode

Read single character.
public readChar ( ) : integer
Résultat integer

readDecimal() public méthode

Read variable length decimal.
public readDecimal ( boolean $isCollectionElement = false ) : string
$isCollectionElement boolean
Résultat string

readDouble() public méthode

Read double.
public readDouble ( boolean $isCollectionElement = false ) : double
$isCollectionElement boolean
Résultat double

readFloat() public méthode

Read float.
public readFloat ( boolean $isCollectionElement = false ) : float
$isCollectionElement boolean
Résultat float

readInet() public méthode

Read inet.
public readInet ( boolean $isCollectionElement = false ) : string
$isCollectionElement boolean
Résultat string

readInt() public méthode

Read unsigned int.
public readInt ( boolean $isCollectionElement = false ) : integer
$isCollectionElement boolean
Résultat integer

readList() public méthode

Read list.
public readList ( $valueType ) : array
$valueType
Résultat array

readLongString() public méthode

Read long string.
public readLongString ( ) : string
Résultat string

readMap() public méthode

Read map.
public readMap ( $keyType, $valueType ) : array
$keyType
$valueType
Résultat array

readShort() public méthode

Read unsigned short.
public readShort ( ) : integer
Résultat integer

readString() public méthode

Read string.
public readString ( ) : string
Résultat string

readTimestamp() public méthode

Cassandra is using the default java date representation, which is the milliseconds since epoch. Since we cannot use 64 bits integers without extra libraries, we are reading this as two 32 bits numbers and calculate the seconds since epoch.
public readTimestamp ( ) : integer
Résultat integer

readUuid() public méthode

Read uuid.
public readUuid ( boolean $isCollectionElement = false ) : string
$isCollectionElement boolean
Résultat string

readVarint() public méthode

Read variable length integer.
public readVarint ( boolean $isCollectionElement = false ) : string
$isCollectionElement boolean
Résultat string