PhpOrient - Record()

On occasion, you may want to operate a record or build one from scratch within your application, before adding it to or syncing it with OrientDB. In PhpOrient, these operations are controlled by the Record() class.

Working with Records

Record objects require no arguments to instantiate. Once created, you can call various methods on the object to define its class, Record ID, data and so on.

$record = new Record()
   ->setRid(new ID(0))
      ['accommodation' => 'bungalow']);
Method Description
getOClass() Retrieve the class name
getOData() Retrieves record data
getRid() Returns the Record ID
jsonSerialize() Returns record in serialized JSON format
recordSerialize() Returns record in serialized format
setOClass() Sets the class
setOData() Sets record data
setRid() Sets the Record ID

results matching ""

    No results matching ""