getSchema() public method

The Schema for the Entity, if known.
public getSchema ( ) : Schema | null
return Schema | null
コード例 #1
0
ファイル: RESTv1.php プロジェクト: tomwalder/php-gds
 /**
  * Find and return the field definitions (if any) for the Entity
  *
  * @param Entity $obj_gds_entity
  * @return array
  */
 private function bestEffortFieldDefs(Entity $obj_gds_entity)
 {
     if ($obj_gds_entity->getSchema() instanceof Schema) {
         return $obj_gds_entity->getSchema()->getProperties();
     }
     if ($this->obj_schema instanceof Schema) {
         return $this->obj_schema->getProperties();
     }
     return [];
 }