Granada\ORM::_add_result_column PHP Méthode

_add_result_column() protected méthode

Internal method to add an unquoted expression to the set of columns returned by the SELECT query. The second optional argument is the alias to return the expression as.
protected _add_result_column ( $expr, $alias = null )
    protected function _add_result_column($expr, $alias = null)
    {
        if (!is_null($alias)) {
            $expr .= " AS " . $this->_quote_identifier($alias);
        }
        if ($this->_using_default_result_columns) {
            $this->_result_columns = array($expr);
            $this->_using_default_result_columns = false;
        } else {
            $this->_result_columns[] = $expr;
        }
        return $this;
    }
ORM