eZ\Publish\Core\Persistence\Doctrine\SelectDoctrineQuery::alias PHP Method

alias() public method

This method can be used to create an alias for either a table or a column. Example: this will make the table users have the alias employees and the column user_id the alias employee_id $q->select( $q->alias( 'user_id', 'employee_id' ) ->from( $q->alias( 'users', 'employees' ) );
public alias ( string $name, string $alias ) : string
$name string
$alias string
return string the query string "columnname as targetname"
    public function alias($name, $alias)
    {
        return $name . ' ' . $alias;
    }