PHP Трейт Webiny\Component\Http\HttpTrait

Показать файл Открыть проект

Защищенные методы

Метод Описание
httpCookie ( ) : Cookie Get Cookie instance.
httpRedirect ( string | UrlObject $url, string | integer | array $headers = [], integer $redirectCode = 301 ) Redirect the request to the given url.
httpRequest ( ) : Request Get Request component instance.
httpResponse ( string $content = '', integer $statusCode = 200, array $headers = [] ) : Response Creates and returns a new Response instance.
httpSession ( ) : Session Get Session instance.

Описание методов

httpCookie() защищенный статический Метод

Get Cookie instance.
protected static httpCookie ( ) : Cookie
Результат Cookie

httpRedirect() защищенный статический Метод

Redirect the request to the given url.
protected static httpRedirect ( string | UrlObject $url, string | integer | array $headers = [], integer $redirectCode = 301 )
$url string | Webiny\Component\StdLib\StdObject\UrlObject\UrlObject
$headers string | integer | array Headers that you wish to send with your request.
$redirectCode integer

httpRequest() защищенный статический Метод

Get Request component instance.
protected static httpRequest ( ) : Request
Результат Request

httpResponse() защищенный статический Метод

Creates and returns a new Response instance.
protected static httpResponse ( string $content = '', integer $statusCode = 200, array $headers = [] ) : Response
$content string Content that will be attached to the response.
$statusCode integer HTTP status code that will be sent back to the user.
$headers array Additional headers that should be attached to the response.
Результат Response

httpSession() защищенный статический Метод

Get Session instance.
protected static httpSession ( ) : Session
Результат Session