docs/examples/Broker.php
protected function redirect(string $url, array $parameters = [], int $httpResponseCode = 307)
    {
        $query = '';
        // Making URL query string if parameters given.
        if (!empty($parameters)) {
            $query = '?';
            if (parse_url($url, PHP_URL_QUERY)) {
                $query = '&';
            }
            $query .= http_build_query($parameters);
        }

        header('Location: ' . $url . $query, true, $httpResponseCode);
        exit;
    }
protected function redirect(string $url, array $parameters = [], int $httpResponseCode = 307)
    {
        $query = '';
        // Making URL query string if parameters given.
        if (!empty($parameters)) {
            $query = '?';
            if (parse_url($url, PHP_URL_QUERY)) {
                $query = '&';
            }
            $query .= http_build_query($parameters);
        }

        header('Location: ' . $url . $query, true, $httpResponseCode);
        exit;
    }
protected function redirect ( string $ url , array $ parameters = [ ] , int $ httpResponseCode = 307 ) { $ query = '' ; // Making URL query string if parameters given. if ( ! empty ( $ parameters ) ) { $ query = '?' ; if ( parse_url ( $ url , PHP_URL_QUERY ) ) { $ query = '&' ; } $ query .= http_build_query ( $ parameters ) ; } header ( 'Location: ' . $ url . $ query , true , $ httpResponseCode ) ; exit ; }
Redirect client to specified url.

@param string $url URL to be redirected.
@param array $parameters HTTP query string.
@param int $httpResponseCode HTTP response code for redirection.

@return void
Redirect client to specified url .