Path

ez components / documentation / api reference / trunk / webdav


eZ Components trunk

Webdav: ezcWebdavRequest

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

Class: ezcWebdavRequest

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

Descendents

Child Class Description
ezcWebdavPutRequest Abstract representation of a PUT request.
ezcWebdavMakeCollectionRequest Abstract representation of a MKCOL request.
ezcWebdavOptionsRequest Abstract representation of a OPTIONS request.
ezcWebdavGetRequest Abstract representation of a GET request.
ezcWebdavCopyRequest Abstract representation of a COPY request.
ezcWebdavMoveRequest Abstract representation of a MOVE request.
ezcWebdavPropFindRequest Abstract representation of a PROPFIND request.
ezcWebdavDeleteRequest Abstract representation of a DELETE request.
ezcWebdavHeadRequest Abstract representation of a HEAD request.
ezcWebdavPropPatchRequest Abstract representation of a PROPPATCH request.

Constants

DEPTH_INFINITY = -1
DEPTH_ONE = 1
DEPTH_ZERO = 0 Constants for the 'Depth' headers and property fields.

Member Variables

protected array(string=>mixed) $headers = array()
Container for header information.
protected array(string=>mixed) $properties = array()
Properties.

Method Summary

public void __construct( $requestUri )
Creates a new request object.
public mixed getHeader( $headerName )
Returns the contents of a specific header.
public void setHeader( $headerName, $headerValue )
Sets a header to a specified value.
public void setHeaders( $headers )
Sets a header to a specified value.
public void validateHeaders( )
Validates the headers set in this request.

Methods

__construct

void __construct( string $requestUri )
Creates a new request object.
Creates a new request object that refers to the given $requestUri, which is a path understandable by the ezcWebdavBackend.

Parameters

Name Type Description
$requestUri string  

Redefined in descendants as

Method Description
ezcWebdavPutRequest::__construct() Creates a new PUT request object.
ezcWebdavMakeCollectionRequest::__construct() Creates a new MKCOL request object.
ezcWebdavCopyRequest::__construct() Creates a new COPY request object.
ezcWebdavMoveRequest::__construct() Creates a new MOVE request object.
ezcWebdavPropFindRequest::__construct() Creates a new PROPFIND request object.
ezcWebdavPropPatchRequest::__construct() Creates a new PROPPATCH request object.

getHeader

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

Parameters

Name Type Description
$headerName string  

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  

setHeaders

void setHeaders( $headers )
Sets a header to a specified value.
Sets the values for the headers given in $headers to the specified values. All processable headers will be validated centrally in validateHeaders().
For validation of header content, the method validateHeaders() can be overwritten.

Parameters

Name Type Description
$headers array  

validateHeaders

void validateHeaders( )
Validates the headers set in this request.
This method is called by ezcWebdavServer after the request object has been created by an ezcWebdavTransport. 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. The call of the parent method is *mandatory* to have common WebDAV and HTTP headers validated, too!

Throws

ClassDescription
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
ezcWebdavPutRequest::validateHeaders() Validates the headers set in this request.
ezcWebdavCopyRequest::validateHeaders() Validates the headers set in this request.
ezcWebdavMoveRequest::validateHeaders() Validates the headers set in this request.
ezcWebdavPropFindRequest::validateHeaders() Validates the headers set in this request.

Last updated: Mon, 21 Dec 2009