GDS\Entity::getData PHP Method

getData() public method

Get the entire data array
public getData ( ) : array
return array
    public function getData()
    {
        return $this->arr_data;
    }

Usage Example

 /**
  * Build & return the properties for the Entity
  *
  * @param Entity $obj_gds_entity
  * @return array
  * @throws \Exception
  */
 protected function createProperties(Entity $obj_gds_entity)
 {
     $arr_property_map = [];
     $arr_field_defs = $this->obj_schema->getProperties();
     foreach ($obj_gds_entity->getData() as $str_field_name => $mix_value) {
         if (isset($arr_field_defs[$str_field_name])) {
             $arr_property_map[$str_field_name] = $this->createProperty($arr_field_defs[$str_field_name], $mix_value);
         } else {
             $arr_dynamic_data = $this->determineDynamicType($mix_value);
             $arr_property_map[$str_field_name] = $this->createProperty(['type' => $arr_dynamic_data['type'], 'index' => TRUE], $arr_dynamic_data['value']);
         }
     }
     return $arr_property_map;
 }