Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitHttpRequestParser

Core::arbitHttpRequestParser

Class arbitHttpRequestParser

The HTTP request class extends the ase request class by user submitted information on accepted languages and content types.

The HTTP request class extends the ase request class by user submitted information on accepted languages and content types.

ezcMvcRequestParser
   |
   --arbitHttpRequestParser
Author(s):
Version:   $Revision: 1547 $
License:   GPL

Member Variables

protected mixed $acceptDefaultValues = array(
'HTTP_ACCEPT_LANGUAGE' => array(
array(
'value' => 'en',
'priority' => 1.,
),),'HTTP_ACCEPT_CHARSET'=>array(array('value'=>'utf-8','priority'=>1.,),),'HTTP_ACCEPT_ENCODING'=>array(array('value'=>'identity','priority'=>1.,),),'HTTP_ACCEPT'=>array(array('value'=>'*/*','priority'=>1.,),),)
protected string $basePath = null
URL base path.

URL base path. When arbit does not reside in the document root, this variable point to the location of the arbit directory. This is autodetected from PHP_SELF.

Method Summary

public ezcMvcRequest createRequest( )
Uses the data from the superglobals.
protected array parseAcceptHeader( $header )
Parse HTTP Accept headers Parse the typical HTTP accept headers and return an array with the extracted information sorted by priority. like: array( array( 'value' => (string), 'priority' => (float), 'country' => (string | null), ), .
protected void parseUrl( $url )
Parse a URL Parse the given URL and return a set of controller, action and optional parameters to be handled in the application. arbitRequest object, which (besides other optional information) contains the name of the controller, action and the paramters of the request.
protected void processAcceptHeaders( )
Process HTTP accept headers
protected string sanitizeUrl( $url )
Remove basepath from url If arbit resides in a subdirectory, and not in the htdocs folder itself, remove the preceeding irrelevant stuff from the URL and store it for the URL serialitzation.

Methods

createRequest

ezcMvcRequest createRequest( )

Uses the data from the superglobals.

Uses the data from the superglobals.

parseAcceptHeader

array parseAcceptHeader( string $header )

Parse HTTP Accept headers Parse the typical HTTP accept headers and return an array with the extracted information sorted by priority. like: array( array( 'value' => (string), 'priority' => (float), 'country' => (string | null), ), .

Parse HTTP Accept headers Parse the typical HTTP accept headers and return an array with the extracted information sorted by priority. The returned array will look like: array( array( 'value' => (string), 'priority' => (float), 'country' => (string | null), ), ... )

Parameters:
Name Type Description
$header string

parseUrl

void parseUrl( string $url )

Parse a URL Parse the given URL and return a set of controller, action and optional parameters to be handled in the application. arbitRequest object, which (besides other optional information) contains the name of the controller, action and the paramters of the request.

Parse a URL Parse the given URL and return a set of controller, action and optional parameters to be handled in the application. The result should be a arbitRequest object, which (besides other optional information) contains the name of the controller, action and the paramters of the request.

Parameters:
Name Type Description
$url string

processAcceptHeaders

void processAcceptHeaders( )

Process HTTP accept headers

Process HTTP accept headers

sanitizeUrl

string sanitizeUrl( string $url )

Remove basepath from url If arbit resides in a subdirectory, and not in the htdocs folder itself, remove the preceeding irrelevant stuff from the URL and store it for the URL serialitzation.

Remove basepath from url If arbit resides in a subdirectory, and not in the htdocs folder itself, remove the preceeding irrelevant stuff from the URL and store it for the URL serialitzation.

Parameters:
Name Type Description
$url string
Documentation generated on Mon, 05 Apr 2010 14:02:10 +0200 by phpDocumentor 1.4.3