PHP Interface Bravo3\Orm\Serialisers\SerialiserInterface

Exibir arquivo Open project: bravo3/orm Interface Usage Examples

Public Methods

Method Description
deserialise ( Entity $metadata, SerialisedData $data, object $entity ) Deserialise the entity
getSerialiserCode ( ) : string Get a unique code for this serialiser, used as the header for the stored object
serialise ( Entity $metadata, object $entity ) : SerialisedData Serialise the entity

Method Details

deserialise() public method

Deserialise the entity
public deserialise ( Entity $metadata, SerialisedData $data, object $entity )
$metadata Bravo3\Orm\Mappers\Metadata\Entity Metadata object to match the entity
$data Bravo3\Orm\Drivers\Common\SerialisedData Data to deserialise
$entity object Entity to hydrate

getSerialiserCode() public method

Get a unique code for this serialiser, used as the header for the stored object
public getSerialiserCode ( ) : string
return string

serialise() public method

Serialise the entity
public serialise ( Entity $metadata, object $entity ) : SerialisedData
$metadata Bravo3\Orm\Mappers\Metadata\Entity
$entity object
return Bravo3\Orm\Drivers\Common\SerialisedData