Docs

Request Class


Definition

Namespace: DafCore
Phar: DafCore.phar
Implements: IRequest

Methods

function GetUrlPath() : string
Get the url without queryParams.
function GetQueryParams() : array
Get the query parameters.
function GetRouteParams() : array
Get the query parameters.
function GetRouteParams() : void
Set the route parameters. ( Router:class set the route parameters ).
function GetMethod() : string
Get the request method name.
function GetBody() : RequestBody
Get the parameters for [ POST, PUT, DELETE ] methods as RequestBody that contine the parameters as props.
RequestBody:class extends stdClass
function GetBodyArray() : array
Get the parameters for [ POST, PUT, DELETE ] methods as array.
function GetHeaders() : array
Get the request headers as array.
function GetCookies() : array
Get the request headers as array.
function TryGetCookie(string $name, &$value) : bool
Get the request cookie by key.
if cookie found return true and set the $value to the cookie value else return false.