Avolutions\Orm\EntityConfiguration
The EntityConfiguration class provides all configurations for an entity, e.g. the mapping and the related database table name.
Methods
Method | Visibility | Description |
---|---|---|
__construct() | public | Creates a new EntityConfiguration for the given Entity type and loads the corresponding EntityMapping, table and id column. |
getFieldQuery() | public | Loads the fields from the EntityMapping and returns the field phrase for the database query. |
getIdColumn() | public | Returns the name of the ID column in the database table. |
getMapping() | public | Returns the mapping between the entity and the database table. |
getTable() | public | Returns the related database table of the entity. |
Method Details
__construct()
Creates a new EntityConfiguration for the given Entity type and loads the corresponding EntityMapping, table and id column.
public
__construct(Application $Application, string $entity) : mixed
Parameters
Application
$Application
Application instance.
string
$entity
The name of the Entity type.
getFieldQuery()
Loads the fields from the EntityMapping and returns the field phrase for the database query.
public
getFieldQuery() : string
Return values
string Loads the fields from the EntityMapping and returns the field phrase for the database query.getIdColumn()
Returns the name of the ID column in the database table.
public
getIdColumn() : string
Return values
string Returns the name of the ID column in the database table.getMapping()
Returns the mapping between the entity and the database table.
public
getMapping() : EntityMapping