public function select($fields)
    {
        foreach ($fields as $key => $value) {
            if (is_int($key)) {
                $this->associationQueryFields($value);
            } elseif (is_array($value)) {
                $alias = $this->tableAlias();
                $this->queryBuilder->join($this->getFullFieldName($key, self::DEFAULT_TABLE_ALIAS), $alias);
                foreach ($value as $valueField) {
                    $this->queryFields[] = $this->getFullFieldName($valueField, $alias);
                }
            } else {
                $this->queryFields[] = $value;
            }
        }
        $this->queryBuilder->select(implode(',', $this->queryFields));

        return $this;
    }
public function select($fields)
    {
        foreach ($fields as $key => $value) {
            if (is_int($key)) {
                $this->associationQueryFields($value);
            } elseif (is_array($value)) {
                $alias = $this->tableAlias();
                $this->queryBuilder->join($this->getFullFieldName($key, self::DEFAULT_TABLE_ALIAS), $alias);
                foreach ($value as $valueField) {
                    $this->queryFields[] = $this->getFullFieldName($valueField, $alias);
                }
            } else {
                $this->queryFields[] = $value;
            }
        }
        $this->queryBuilder->select(implode(',', $this->queryFields));

        return $this;
    }
public function select ( $ fields ) { foreach ( $ fields as $ key => $ value ) { if ( is_int ( $ key ) ) { $ this -> associationQueryFields ( $ value ) ; } elseif ( is_array ( $ value ) ) { $ alias = $ this -> tableAlias ( ) ; $ this -> queryBuilder -> join ( $ this -> getFullFieldName ( $ key , self :: DEFAULT_TABLE_ALIAS ) , $ alias ) ; foreach ( $ value as $ valueField ) { $ this -> queryFields [ ] = $ this -> getFullFieldName ( $ valueField , $ alias ) ; } } else { $ this -> queryFields [ ] = $ value ; } } $ this -> queryBuilder -> select ( implode ( ',' , $ this -> queryFields ) ) ; return $ this ; }
Add a select statement.

@param associationField.fkField
@param $field
Add a select statement .