public function query($id = null, $raw = false)
    {
        if ($id !== null) {
            return $this->queries[$id] ?? null;
        }

        if ($raw) {
            return $this->queries;
        }

        if (!$this->queries) {
            return '';
        }

        return http_build_query($this->queries);
    }
public function query($id = null, $raw = false)
    {
        if ($id !== null) {
            return $this->queries[$id] ?? null;
        }

        if ($raw) {
            return $this->queries;
        }

        if (!$this->queries) {
            return '';
        }

        return http_build_query($this->queries);
    }
public function query ( $ id = null , $ raw = false ) { if ( $ id !== null ) { return $ this -> queries [ $ id ] ?? null ; } if ( $ raw ) { return $ this -> queries ; } if ( ! $ this -> queries ) { return '' ; } return http_build_query ( $ this -> queries ) ; }
Return full query string or a single query attribute.

@param string $id Optional attribute. Get a single query attribute if set
@param bool $raw If true and $id is not set, return the full query array. Otherwise return the query string

@return string|array Returns an array if $id = null and $raw = true
Return full query string or a single query attribute .