A PHP representation of the CQL varint datatype

Implements

Methods

__construct

( string $value )

Creates a new variable length integer.

Parameters:
Name Type Details
$value string

integer value as a string

string

__toString

( )

Returns the integer value.

Returns:
Type Details
string

integer value

Dse\Type

type

( )

The type of this varint.

Returns:
Type Details
Dse\Type
string

value

( )

Returns the integer value.

Returns:
Type Details
string

integer value

Dse\Numeric

add

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to add to this one

Returns:
Type Details
Dse\Numeric

sum

Dse\Numeric

sub

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to subtract from this one

Returns:
Type Details
Dse\Numeric

difference

Dse\Numeric

mul

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to multiply this one by

Returns:
Type Details
Dse\Numeric

product

Dse\Numeric

div

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to divide this one by

Returns:
Type Details
Dse\Numeric

quotient

Dse\Numeric

mod

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to divide this one by

Returns:
Type Details
Dse\Numeric

remainder

Dse\Numeric

abs

( )
Returns:
Type Details
Dse\Numeric

absolute value

Dse\Numeric

neg

( )
Returns:
Type Details
Dse\Numeric

negative value

Dse\Numeric

sqrt

( )
Returns:
Type Details
Dse\Numeric

square root

int

toInt

( )
Returns:
Type Details
int

this number as int

float

toDouble

( )
Returns:
Type Details
float

this number as float