Webdav: ezcWebdavHeaderHandler
[ ]
[ Plugin architecture ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavHeaderHandler
|
An instance of this class manages header parsing and handling. [
source]
An object of this class takes care about headers in the
ezcWebdavTransport to parse incoming headers and serialize outgoing headers. Like for the
ezcWebdavPropertyHandler, the instance of this class that is used in the current transport layer must be accessable for plugins.
Member Variables
|
protected array(string=>string) |
$headerMap
= array( 'Content-Length' => 'HTTP_CONTENT_LENGTH', 'Content-Type' => 'CONTENT_TYPE', 'Depth' => 'HTTP_DEPTH', 'Destination' => 'HTTP_DESTINATION', 'Lock-Token' => 'HTTP_LOCK_TOKEN', 'Overwrite' => 'HTTP_OVERWRITE', 'Timeout' => 'HTTP_TIMEOUT', 'Server' => 'SERVER_SOFTWARE', )
Map of regular header names to $_SERVER keys. |
|
protected ezcWebdavPathFactory |
$pathFactory
Pathfactory to process incoming headers. |
Method Summary
|
public mixed |
parseHeader(
$headerName )
Parses a single header. |
|
public array(string=>mixed) |
parseHeaders(
$headerNames )
Returns an array with the given headers. |
|
protected mixed |
processHeader(
$headerName, $value )
Processes a single header value. |
Methods
parseHeader
mixed parseHeader(
string
$headerName )
Parses a single header.
Retrieves a $headerName and returns the processed value for it, if it does exist. If the requested header is unknown, a
ezcWebdavUnknownHeaderException is thrown. If the requested header is not present in $_SERVER null is returned.
Parameters
| Name |
Type |
Description |
$headerName |
string |
|
parseHeaders
array(string=>mixed) parseHeaders(
$headerNames )
Returns an array with the given headers.
Checks for the availability of headers in $headerNamess, given as an array of header names, and parses them according to their format.
The returned array can be used with ezcWebdavRequest->setHeaders().
Parameters
| Name |
Type |
Description |
$headerNames |
array(string) |
|
Throws
| Class | Description |
ezcWebdavUnknownHeaderException |
if a header requested in $headerNames is not known in $headerNames. |
processHeader
mixed processHeader(
string
$headerName, string
$value )
Processes a single header value.
Takes the $headerName and $value of a header and parses the value accordingly, if necessary. Returns the parsed or unmanipuled result.
Parameters
| Name |
Type |
Description |
$headerName |
string |
|
$value |
string |
|
Last updated: Wed, 28 Nov 2007