PHP Class Mongolid\Serializer\Type\ObjectID

Inheritance: implements Mongolid\Serializer\SerializableTypeInterface, implements JsonSerializabl\JsonSerializable
Datei anzeigen Open project: leroy-merlin-br/mongolid Class Usage Examples

Protected Properties

Property Type Description
$objectIdString string

Public Methods

Method Description
__construct ( MongoDB\BSON\ObjectID | string $mongoId = null ) Constructor.
__toString ( ) : string Returns the hexidecimal representation of this ObjectID.
convert ( ) : MongoDB\BSON\ObjectID
jsonSerialize ( ) : string
serialize ( ) : string
unserialize ( mixed $data ) : void

Method Details

__construct() public method

Constructor.
public __construct ( MongoDB\BSON\ObjectID | string $mongoId = null )
$mongoId MongoDB\BSON\ObjectID | string MongoDB ObjectID or a string.

__toString() public method

Returns the hexidecimal representation of this ObjectID.
public __toString ( ) : string
return string

convert() public method

public convert ( ) : MongoDB\BSON\ObjectID
return MongoDB\BSON\ObjectID

jsonSerialize() public method

public jsonSerialize ( ) : string
return string

serialize() public method

public serialize ( ) : string
return string

unserialize() public method

public unserialize ( mixed $data ) : void
$data mixed Serialized string to parse.
return void

Property Details

$objectIdString protected_oe property

protected string $objectIdString
return string