Class Brightzone\GremlinDriver\Serializers\Json

InheritanceBrightzone\GremlinDriver\Serializers\Json
ImplementsBrightzone\GremlinDriver\Serializers\SerializerInterface

Gremlin-server PHP JSON Serializer class Builds and parses message body for Messages class

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$mimeType int Value of this serializer. Brightzone\GremlinDriver\Serializers\Json
$name string The name of the serializer Brightzone\GremlinDriver\Serializers\Json

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getMimeType() Get this serializer's value This will be deprecated with TP3 Gremlin-server Brightzone\GremlinDriver\Serializers\Json
getName() Get this serializer's Name Brightzone\GremlinDriver\Serializers\Json
serialize() Serializes the data Brightzone\GremlinDriver\Serializers\Json
unserialize() Unserializes the data Brightzone\GremlinDriver\Serializers\Json

Property Details

$mimeType public static property

Value of this serializer. Will be deprecated in TP3

public static int $mimeType 'application/json'
$name public static property

The name of the serializer

public static string $name 'JSON'

Method Details

getMimeType() public method

Get this serializer's value This will be deprecated with TP3 Gremlin-server

public string getMimeType ( )
return string

Name of serializer

getName() public method

Get this serializer's Name

public string getName ( )
return string

Name of serializer

serialize() public method

Serializes the data

public int serialize ( &$data )
$data
return int

Length of generated string

unserialize() public method

Unserializes the data

public array unserialize ( $data )
$data array

Data to be unserialized

return array

Unserialized message