Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavResponse

Webdav::ezcWebdavResponse

Class ezcWebdavResponse

Base class for all response objects.

This base class must be extended by all response representation classes.

Source for this file: /Webdav/src/interfaces/response.php

ezcWebdavInfrastructureBase
   |
   --ezcWebdavResponse
Version:   //autogentag//

Descendants

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

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 static array $errorNames
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
ezcWebdavCopyResponse::__construct() Creates a new response object. 
ezcWebdavMultistatusResponse::__construct() Creates a new response object. 
ezcWebdavErrorResponse::__construct() Creates a new response object. 
ezcWebdavHeadResponse::__construct() Creates a new response object. 
ezcWebdavOptionsResponse::__construct() Creates a new response object. 
ezcWebdavPropStatResponse::__construct() Creates a new response object. 
ezcWebdavPutResponse::__construct() Creates a new response object. 
ezcWebdavDeleteResponse::__construct() Creates a new response object. 
ezcWebdavPropFindResponse::__construct() Creates a new response object. 
ezcWebdavGetResourceResponse::__construct() Creates a new response object. 
ezcWebdavMakeCollectionResponse::__construct() Creates a new response object. 
ezcWebdavGetCollectionResponse::__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!

Exceptions:
Type Description
ezcWebdavInvalidHeaderException if a header is present, but its content does not validate.
ezcWebdavMissingHeaderException if a required header is missing.
Redefined in descendants as:
Method Description
ezcWebdavMultistatusResponse::validateHeaders() Validates the headers set in this response. 
ezcWebdavOptionsResponse::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.

Documentation generated by phpDocumentor 1.4.3