kernel/private/rest/classes/request/rest_request.php

Show: inherited
Table of Contents

File containing the ezpRestRequest class

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Proprietary Use License v1.0  
Package
rest  

\ezpRestRequest

Package: Default

Class mimicking ezcMvcRequest with distinct containers for GET and POST variables.

The current implementation is a tentative implementation, for long term usage, we are likely to use dedicated structs such as for cookie. This in addition or alternatively to a more selective parser, which could cherry pick variables depending on request type, context and so forth.

Parent(s)
\ezcMvcRequest

Properties

Propertypublicarray  $contentVariables= ''

Variables related to content, extracted from GET

Details
Type
array
Propertypublicarray  $get= ''

GET variables

Details
Type
array
Propertypublicbool  $isEncrypted= ''

Signifies whether the request was made over an encrypted connection.

Details
Type
bool
Propertypublicarray  $post= ''

POST variables

Details
Type
array

Methods

methodpublic__construct( \DateTime $date = null, string $protocol = '', string $host = '', string $uri = '', string $requestId = '', string $referrer = '', array $variables = array(), array $get = array(), array $post = array(), array $contentVariables = array(), bool $isEncrypted = false, string $body = '', \array(ezcMvcRequestFile) $files = null, \ezcMvcRequestAccept $accept = null, \ezcMvcRequestUserAgent $agent = null, \ezcMvcRequestAuthentication $authentication = null, \ezcMvcRawRequest $raw = null, \array(ezcMvcRequestCookie) $cookies = array(), bool $isFatal = false ) : void

Constructs a new ezpRestRequest.

Parameters
Name Type Description
$date \DateTime
$protocol string
$host string
$uri string
$requestId string
$referrer string
$variables array

Containing request variables set by the router

$get array

The GET variables which are available in the request

$post array

The POST variables that are available in the request

$contentVariables array

GET variables related to eZ Publish content

$isEncrypted bool

Is the request made over an encrypted connection

$body string
$files \array(ezcMvcRequestFile)
$accept \ezcMvcRequestAccept
$agent \ezcMvcRequestUserAgent
$authentication \ezcMvcRequestAuthentication
$raw \ezcMvcRawRequest
$cookies \array(ezcMvcRequestCookie)
$isFatal bool
methodpublic__set_state( \array(string=>mixed) $array ) : \ezpRestRequest
static

Returns a new instance of this class with the data specified by $array.

$array contains all the data members of this class in the form: array('member_name'=>value).

__set_state makes this class exportable with var_export. var_export() generates code, that calls this method when it is parsed with PHP.

Parameters
Name Type Description
$array \array(string=>mixed)
Returns
Type Description
\ezpRestRequest
methodpublicgetBaseURI( ) : string

Returns base URI with protocol and host (e.g. http://myhost.com/foo/bar)

Returns
Type Description
string
methodpublicgetContentQueryString( bool $withQuestionMark = false ) : string

Returns current content variables as a regular query string (e.g. "foo=bar&this=that")

Parameters
Name Type Description
$withQuestionMark bool

If true, the question mark ("?") will be added

Returns
Type Description
string
methodpublicgetHostURI( ) : string

Returns the host with the protocol

Returns
Type Description
string
Documentation was generated by DocBlox 0.18.1.