Home  Support  API

EntityProjection Class Reference
[Projections]


Projection for selecting all properties of the specified entity.

Example:

 // SELECT product_id, product_name, product_price
 // FROM product
 $query =
    EntityQuery::create(Product::orm())
        ->get(Projection::entity("Product"));

Definition at line 33 of file EntityProjection.class.php.

Inheritance diagram for EntityProjection:
Inheritance graph

List of all members.

Public Member Functions

 __construct (IQueryable $entity)
 fill (SelectQuery $selectQuery, EntityQueryBuilder $entityQueryBuilder)
 Fills the SelectQuery in context of the specified ORM-related entity.

Protected Member Functions

 fillField ($field, SelectQuery $selectQuery, EntityQueryBuilder $entityQueryBuilder)
 Adds the table field to the SELECT list.

Constructor & Destructor Documentation

EntityProjection::__construct ( IQueryable entity  ) 
Parameters:
IQueryable $entity entity to select

Definition at line 43 of file EntityProjection.class.php.


Member Function Documentation

EntityProjection::fill ( SelectQuery selectQuery,
EntityQueryBuilder entityQueryBuilder 
)

Fills the SelectQuery in context of the specified ORM-related entity.

Returns:
void

Implements IProjection.

Definition at line 48 of file EntityProjection.class.php.

References fillField().

EntityProjection::fillField ( field,
SelectQuery selectQuery,
EntityQueryBuilder entityQueryBuilder 
) [protected]

Adds the table field to the SELECT list.

Parameters:
string $field
SelectQuery $selectQuery
EntityQueryBuilder $entityQueryBuilder

Definition at line 62 of file EntityProjection.class.php.

References SelectQuery::get(), EntityQueryBuilder::getAlias(), and EntityQueryBuilder::registerIdentifier().

Referenced by fill().


The documentation for this class was generated from the following file: