Doctrine\ORM\QueryBuilder::from
Create and add a query root corresponding to the entity identified by the given alias, forming a cartesian product with any existing query roots.
<code> $qb = $em->createQueryBuilder() ->select('u') ->from('User', 'u') </code>
Signature
public function from(string
$from,
[string
$alias = null,
[string
$indexBy = null]] )
Parameters
$from
— string- The class name.
$alias
— string- The alias of the class.
$indexBy
— string- The index for the from.
Returns
- QueryBuilder
- This QueryBuilder instance.