lib/Doctrine/ORM/QueryBuilder.php
public function from($from, $alias, $indexBy = null)
    {
        return $this->add('from', new Expr\From($from, $alias, $indexBy), true);
    }
public function from($from, $alias, $indexBy = null)
    {
        return $this->add('from', new Expr\From($from, $alias, $indexBy), true);
    }
public function from ( $ from , $ alias , $ indexBy = null ) { return $ this -> add ( 'from' , new Expr \ From ( $ from , $ alias , $ indexBy ) , true ) ; }
Creates and adds 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>

@param string $from    The class name.
@param string $alias   The alias of the class.
@param string $indexBy The index for the from.

@return self
Creates and adds a query root corresponding to the entity identified by the given alias forming a cartesian product with any existing query roots .