class Request extends Request

extends Symfony\Component\HttpFoundation\Request for adding some helpers

Class Request

Methods

initialize( array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)

No description

getPathInfo()

Filter PathInfo to allow slash ending uri

getRealPathInfo()

No description

getProductId()

No description

getUriAddingParameters( array $parameters = null)

No description

toString($withContent = true)

No description

setControllerType( string $controllerType)

No description

bool
fromControllerType($controllerType)

Detects where does the request

bool
fromApi()

Detect if the request comes from the api

bool
fromAdmin()

Detect if the request comes from the admin

bool
fromFront()

Detect if the request comes from the front

null|Session
getSession()

From a Thelia request, we always return a Thelia Session object.

Details

at line 40
initialize( array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)

Parameters

array $query
array $request
array $attributes
array $cookies
array $files
array $server
$content

at line 60
getPathInfo()

Filter PathInfo to allow slash ending uri

example: /admin will be the same as /admin/

at line 78
getRealPathInfo()

at line 83
getProductId()

at line 88
getUriAddingParameters( array $parameters = null)

Parameters

array $parameters

at line 105
toString($withContent = true)

Parameters

$withContent

at line 122
setControllerType( string $controllerType)

Parameters

string $controllerType

at line 138
bool fromControllerType($controllerType)

Detects where does the request

// Detect if the request comes from the api if ($request->fromControllerType(BaseApiController::CONTROLLER_TYPE)) {...}

Parameters

$controllerType

Return Value

bool

at line 148
bool fromApi()

Detect if the request comes from the api

Return Value

bool

at line 158
bool fromAdmin()

Detect if the request comes from the admin

Return Value

bool

at line 168
bool fromFront()

Detect if the request comes from the front

Return Value

bool

at line 178
null|Session getSession()

From a Thelia request, we always return a Thelia Session object.

Return Value

null|Session