public function buildSelectFields($fields)
    {
        $selectFields = [];
        foreach ((array)$fields as $key => $value) {
            if (is_int($key)) {
                $selectFields[$value] = true;
            } else {
                $selectFields[$key] = is_scalar($value) ? (bool)$value : $value;
            }
        }
        return $selectFields;
    }
public function buildSelectFields($fields)
    {
        $selectFields = [];
        foreach ((array)$fields as $key => $value) {
            if (is_int($key)) {
                $selectFields[$value] = true;
            } else {
                $selectFields[$key] = is_scalar($value) ? (bool)$value : $value;
            }
        }
        return $selectFields;
    }
public function buildSelectFields ( $ fields ) { $ selectFields = [ ] ; foreach ( ( array ) $ fields as $ key => $ value ) { if ( is_int ( $ key ) ) { $ selectFields [ $ value ] = true ; } else { $ selectFields [ $ key ] = is_scalar ( $ value ) ? ( bool ) $ value : $ value ; } } return $ selectFields ; }
Normalizes fields list for the MongoDB select composition.
@param array|string $fields raw fields.
@return array normalized select fields.
Normalizes fields list for the MongoDB select composition .