lib/Doctrine/ORM/Query/ResultSetMapping.php
public function addEntityResult($class, $alias, $resultAlias = null)
    {
        $this->aliasMap[$alias]       = $class;
        $this->entityMappings[$alias] = $resultAlias;

        if ($resultAlias !== null) {
            $this->isMixed = true;
        }

        return $this;
    }
public function addEntityResult($class, $alias, $resultAlias = null)
    {
        $this->aliasMap[$alias]       = $class;
        $this->entityMappings[$alias] = $resultAlias;

        if ($resultAlias !== null) {
            $this->isMixed = true;
        }

        return $this;
    }
public function addEntityResult ( $ class , $ alias , $ resultAlias = null ) { $ this -> aliasMap [ $ alias ] = $ class ; $ this -> entityMappings [ $ alias ] = $ resultAlias ; if ( $ resultAlias !== null ) { $ this -> isMixed = true ; } return $ this ; }
Adds an entity result to this ResultSetMapping.

@param string      $class       The class name of the entity.
@param string      $alias       The alias for the class. The alias must be unique among all entity
results or joined entity results within this ResultSetMapping.
@param string|null $resultAlias The result alias with which the entity result should be
placed in the result structure.

@return ResultSetMapping This ResultSetMapping instance.

@todo Rename: addRootEntity
Adds an entity result to this ResultSetMapping .