LeanMapper\Reflection\EntityReflection::getEntityProperties PHP Method

getEntityProperties() public method

Gets array of all entity's properties
public getEntityProperties ( ) : Property[]
return Property[]
    public function getEntityProperties()
    {
        return $this->properties;
    }

Usage Example

Example #1
0
 /**
  * @param EntityReflection $entityReflection
  * @param string $tableAlias
  * @param string $prefix
  * @internal param string $entityClass
  * @return array
  */
 public function formatSelect(EntityReflection $entityReflection, $tableAlias, $prefix = null)
 {
     isset($prefix) or $prefix = $tableAlias;
     $fields = array();
     foreach ($entityReflection->getEntityProperties() as $property) {
         if (($column = $property->getColumn()) === null) {
             continue;
         }
         $fields["{$tableAlias}.{$column}"] = $prefix . self::PREFIX_SEPARATOR . $column;
     }
     return $fields;
 }