Path

ez components / documentation / api reference / 2008.2 / webdav


eZ Components 2008.2

Webdav: ezcWebdavResponse

[ Tutorial ] [ Clients ] [ Plugin architecture ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcWebdavResponse

Base class for all response objects. [source]
This base class must be extended by all response representation classes.

Parents

ezcWebdavInfrastructureBase
   |
   --ezcWebdavResponse

Descendents

Child Class Description
ezcWebdavPutResponse Class generated by the backend to respond to PUT requests.
ezcWebdavMakeCollectionResponse Class generated by the backend to respond to MKCOL requests.
ezcWebdavPropStatResponse Class generated by the backend to respond to PROPSTAT requests.
ezcWebdavOptionsResponse Class generated by the backend to respond to OPTIONS requests.
ezcWebdavMultistatusResponse Class generated by the backend to indicate multiple responses at once.
ezcWebdavGetCollectionResponse Class generated by the backend to respond to GET requests on collection resources.
ezcWebdavCopyResponse Class generated by the backend to respond to COPY requests.
ezcWebdavGetResourceResponse Class generated by the backend to respond to GET requests on a resource.
ezcWebdavPropFindResponse Class generated by the backend to respond to MKCOL requests.
ezcWebdavDeleteResponse Class generated by the backend to respond to DELETE requests on a resource.
ezcWebdavHeadResponse Class generated by the backend to respond to HEAD requests on a resource.
ezcWebdavErrorResponse Class generated by the backend to indicate an error

Constants

STATUS_100 = 100
STATUS_101 = 101
STATUS_200 = 200
STATUS_201 = 201
STATUS_202 = 202
STATUS_203 = 203
STATUS_204 = 204
STATUS_205 = 205
STATUS_206 = 206
STATUS_207 = 207
STATUS_300 = 300
STATUS_301 = 301
STATUS_302 = 302
STATUS_303 = 303
STATUS_304 = 304
STATUS_305 = 305
STATUS_400 = 400
STATUS_401 = 401
STATUS_402 = 402
STATUS_403 = 403
STATUS_404 = 404
STATUS_405 = 405
STATUS_406 = 406
STATUS_407 = 407
STATUS_408 = 408
STATUS_409 = 409
STATUS_410 = 410
STATUS_411 = 411
STATUS_412 = 412
STATUS_413 = 413
STATUS_414 = 414
STATUS_415 = 415
STATUS_423 = 423
STATUS_424 = 424
STATUS_500 = 500
STATUS_501 = 501
STATUS_502 = 502
STATUS_503 = 503
STATUS_504 = 504
STATUS_505 = 505
STATUS_507 = 507

Properties

string read/write  $responseDescription
Optional user readable response description.
int read/write  $status
Response status code.

Member Variables

public array $errorNames = array(
self::STATUS_100 => 'Continue',
self::STATUS_101 => 'Switching Protocols',

self::STATUS_200 => 'OK',
self::STATUS_201 => 'Created',
self::STATUS_202 => 'Accepted',
self::STATUS_203 => 'Non-Authoritative Information',
self::STATUS_204 => 'No Content',
self::STATUS_205 => 'Reset Content',
self::STATUS_206 => 'Partial Content',
self::STATUS_207 => 'Multi-Status',

self::STATUS_300 => 'Multiple Choices',
self::STATUS_301 => 'Moved Permanently',
self::STATUS_302 => 'Moved Temporarily',
self::STATUS_303 => 'See Other',
self::STATUS_304 => 'Not Modified',
self::STATUS_305 => 'Use Proxy',

self::STATUS_400 => 'Bad Request',
self::STATUS_401 => 'Unauthorized',
self::STATUS_402 => 'Payment Required',
self::STATUS_403 => 'Forbidden',
self::STATUS_404 => 'Not Found',
self::STATUS_405 => 'Method Not Allowed',
self::STATUS_406 => 'Not Acceptable',
self::STATUS_407 => 'Proxy Authentication Required',
self::STATUS_408 => 'Request Time-out',
self::STATUS_409 => 'Conflict',
self::STATUS_410 => 'Gone',
self::STATUS_411 => 'Length Required',
self::STATUS_412 => 'Precondition Failed',
self::STATUS_413 => 'Request Entity Too Large',
self::STATUS_414 => 'Request-URI Too Large',
self::STATUS_415 => 'Unsupported Media Type',
self::STATUS_423 => 'Locked',
self::STATUS_424 => 'Failed Dependency',

self::STATUS_500 => 'Internal Server Error',
self::STATUS_501 => 'Not Implemented',
self::STATUS_502 => 'Bad Gateway',
self::STATUS_503 => 'Service Unavailable',
self::STATUS_504 => 'Gateway Time-out',
self::STATUS_505 => 'HTTP Version not supported',
self::STATUS_507 => 'Insufficient Storage',
)

User readable names for error status codes
protected array(string=>mixed) $headers = array()
Container for header information.
protected array(string=>mixed) $properties = array(
'responseDescription' => null,
)

Properties.

Inherited Member Variables

From ezcWebdavInfrastructureBase:
protected  ezcWebdavInfrastructureBase::$pluginData

Method Summary

public mixed getHeader( $headerName )
Returns the contents of a specific header.
public array(string=>string) getHeaders( )
Returns all headers.
public void setHeader( $headerName, $headerValue )
Sets a header to a specified value.
public void __construct( [$status = self::STATUS_200] )
Construct error response from status.
public void validateHeaders( )
Validates the headers set in this response.
public string __toString( )
Return valid HTTP response string from error code.

Inherited Methods

From ezcWebdavInfrastructureBase :
public mixed ezcWebdavInfrastructureBase::getPluginData()
Retrieves plugin data from the storage.
public bool ezcWebdavInfrastructureBase::hasPluginData()
Returns if plugin data is available in the storage.
public void ezcWebdavInfrastructureBase::removePluginData()
Removes plugin data from the storage.
public void ezcWebdavInfrastructureBase::setPluginData()
Sets plugin data in the storage.

Methods

getHeader

mixed getHeader( string $headerName )
Returns the contents of a specific header.
Returns the content of the header identified with $headerName and null if no content for the header is available.

Parameters

Name Type Description
$headerName string  

getHeaders

array(string=>string) getHeaders( )
Returns all headers.
Returns an array of all headers set in this object, indexed by the header name.

setHeader

void setHeader( string $headerName, mixed $headerValue )
Sets a header to a specified value.
Sets the value for $header to $headerValue. All processable headers will be validated centrally in validateHeaders().
For validation of header content, the method validateHeaders() can be overwritten.

Parameters

Name Type Description
$headerName string  
$headerValue mixed  

__construct

void __construct( [int $status = self::STATUS_200] )
Construct error response from status.

Parameters

Name Type Description
$status int  

Redefined in descendants as

Method Description
ezcWebdavPutResponse::__construct() Creates a new response object.
ezcWebdavMakeCollectionResponse::__construct() Creates a new response object.
ezcWebdavPropStatResponse::__construct() Creates a new response object.
ezcWebdavOptionsResponse::__construct() Creates a new response object.
ezcWebdavMultistatusResponse::__construct() Creates a new response object.
ezcWebdavGetCollectionResponse::__construct() Creates a new response object.
ezcWebdavCopyResponse::__construct() Creates a new response object.
ezcWebdavGetResourceResponse::__construct() Creates a new response object.
ezcWebdavPropFindResponse::__construct() Creates a new response object.
ezcWebdavDeleteResponse::__construct() Creates a new response object.
ezcWebdavHeadResponse::__construct() Creates a new response object.
ezcWebdavErrorResponse::__construct() Creates a new response object.

validateHeaders

void validateHeaders( )
Validates the headers set in this response.
This method is called by ezcWebdavServer after the response object has been created by an ezcWebdavBackend. It must validate all headers specific for this request for existance of required headers and validity of all headers used by the specific request implementation.
All extending classes, which overwrite this method, *must* call the parent implementation to ensure that common headers are validated, too!

Throws

ClassDescription
ezcWebdavMissingHeaderException if a required header is missing.
ezcWebdavInvalidHeaderException if a header is present, but its content does not validate.

Redefined in descendants as

Method Description
ezcWebdavOptionsResponse::validateHeaders() Validates the headers set in this response.
ezcWebdavMultistatusResponse::validateHeaders() Validates the headers set in this response.

__toString

string __toString( )
Return valid HTTP response string from error code.
The response string will be send as a header to the client, indicating the HTTP version, status code and status message.

Last updated: Mon, 05 Jan 2009