PhpOrient\Protocols\Binary\Data\Record::getOClass PHP Method

getOClass() public method

Gets the Orient Class
public getOClass ( ) : string | null
return string | null
    public function getOClass()
    {
        return $this->oClass;
    }

Usage Example

Example #1
0
 /**
  * Hydrate a SpiderRecord from an OrientRecord
  *
  * @param $orientRecord
  * @return Response
  */
 protected function mapOrientRecordToCollection(OrientRecord $orientRecord)
 {
     // Or we map a single record to a Spider Record
     $collection = new Collection($orientRecord->getOData());
     $collection->add(['id' => $orientRecord->getRid()->jsonSerialize(), 'label' => $orientRecord->getOClass(), 'meta.rid' => $orientRecord->getRid(), 'meta.version' => $orientRecord->getVersion(), 'meta.oClass' => $orientRecord->getOClass()]);
     $collection->protect('id');
     $collection->protect('label');
     $collection->protect('meta');
     return $collection;
 }
All Usage Examples Of PhpOrient\Protocols\Binary\Data\Record::getOClass