Class Brightzone\GremlinDriver\Helper

InheritanceBrightzone\GremlinDriver\Helper

Gremlin-server PHP client Helper class

Public Methods

Hide inherited methods

MethodDescriptionDefined By
binToUuid() Convert binary 16 byte UUID to it's canonical representation Brightzone\GremlinDriver\Helper
convertIntFrom32Bit() Convert 32Bit binary into int Brightzone\GremlinDriver\Helper
convertIntTo32Bit() Convert int as decimal into 32Bit binary 'equivalent' Brightzone\GremlinDriver\Helper
createUuid() Return a random 16 byte UUID Brightzone\GremlinDriver\Helper
generateRandomString() Creates a random String based on given params Brightzone\GremlinDriver\Helper
uuidToBin() Convert canonical representation of UUID to it's binary 16 byte equivalent Brightzone\GremlinDriver\Helper

Method Details

binToUuid() public static method

Convert binary 16 byte UUID to it's canonical representation

public static string binToUuid ( $binary )
$binary string

16 byte binary UUID

return string

Canonical representation of UUID

convertIntFrom32Bit() public static method

Convert 32Bit binary into int

Example: input of $bin = hex 0000 002c returned value = 44

public static string convertIntFrom32Bit ( $bin )
$bin \Brightzone\GremlinDriver\binary

Binary data to be converted

return string

Number

convertIntTo32Bit() public static method

Convert int as decimal into 32Bit binary 'equivalent'

Example: input of $int = 44 > dec = 44 > binary = 101100 > hex = 2c returned value > binary = 000000000000000000101100 > hex = 0000 002c

public static string convertIntTo32Bit ( $int )
$int int

Number to be converted

return string

Binary data

createUuid() public static method

Return a random 16 byte UUID

public static string createUuid ( )
return string

16 byte random UUID

generateRandomString() public static method

Creates a random String based on given params

public static string generateRandomString ( $length 10, $addSpaces TRUE, $addNumbers TRUE )
$length int

Length of the string to generate

$addSpaces bool

Whether or not to include spaces in string

$addNumbers bool

Whether or not to include numbers in string

return string

Random generated string

uuidToBin() public static method

Convert canonical representation of UUID to it's binary 16 byte equivalent

public static string uuidToBin ( $string )
$string string

Canonical representation of UUID

return string

16 byte binary UUID