web\Request getAcceptableContentTypes()

getAcceptableContentTypes() public method Returns the content types acceptable by the end user. This is determined by the Accept HTTP header. For example, $_SERVER['HTTP_ACCEPT'] = 'text/plain; q=0.5, application/json; version=1.0, application/xml; version=2.0;'; $types = $request->getAcceptableContentTypes(); print_r($types); // displays: // [ // 'application/json' => ['q' => 1, 'version' => '1.0'], // 'application/xml' => ['q' => 1, 'version' => '2.0'], //

web\Request getAbsoluteUrl()

getAbsoluteUrl() public method Returns the currently requested absolute URL. This is a shortcut to the concatenation of $hostInfo and $url. public string getAbsoluteUrl ( )return string The currently requested absolute URL.

web\Request get()

get() public method Returns GET parameter with a given name. If name isn't specified, returns an array of all GET parameters. public array|mixed get ( $name = null, $defaultValue = null )$name string The parameter name $defaultValue mixed The default parameter value if the parameter does not exist.

web\Request generateCsrfToken()

generateCsrfToken() protected method Generates an unmasked random token used to perform CSRF validation. protected string generateCsrfToken ( )return string The random token for CSRF validation.

web\Request createCsrfCookie()

createCsrfCookie() protected method Creates a cookie with a randomly generated CSRF token. Initial values specified in $csrfCookie will be applied to the generated cookie. See also $enableCsrfValidation. protected yii\web\Cookie createCsrfCookie ( $token )$token string The CSRF token return yii\web\Cookie The generated cookie

web\Request $userIP

$userIP public read-only property User IP address, null if not available public string|null getUserIP ( )

web\Request $userHost

$userHost public read-only property User host name, null if not available public string|null getUserHost ( )

web\Request $userAgent

$userAgent public read-only property User agent, null if not available public string|null getUserAgent ( )

web\Request $url

$url public property The currently requested relative URL. Note that the URI returned is URL-encoded. public string getUrl ( )public void setUrl ( $value )

web\Request $serverPort

$serverPort public read-only property Server port number, null if not available public integer|null getServerPort ( )