Airship\Engine\Bolt\Get::httpGetParams PHP Method

httpGetParams() protected method

Be forewarned: this will overwrite $lastPiece
protected httpGetParams ( string &$lastPiece = null ) : array
$lastPiece string
return array
    protected function httpGetParams(string &$lastPiece = null) : array
    {
        if ($lastPiece === null) {
            return $_GET ?? [];
        }
        $p = \strpos($lastPiece, '?');
        if ($p !== false && empty($_GET)) {
            $_GET = \Airship\array_from_http_query(Binary::safeSubstr($lastPiece, $p + 1));
            $lastPiece = Binary::safeSubstr($lastPiece, 0, $p);
        }
        return $_GET;
    }