Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavRequest

Webdav::ezcWebdavRequest

Class ezcWebdavRequest

Base class for request objects.

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

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

Version:   //autogentag//

Descendants

Child Class Description
ezcWebdavPropPatchRequest Abstract representation of a PROPPATCH request.
ezcWebdavCopyRequest Abstract representation of a COPY request.
ezcWebdavGetRequest Abstract representation of a GET request.
ezcWebdavMoveRequest Abstract representation of a MOVE request.
ezcWebdavHeadRequest Abstract representation of a HEAD request.
ezcWebdavOptionsRequest Abstract representation of a OPTIONS request.
ezcWebdavPutRequest Abstract representation of a PUT request.
ezcWebdavDeleteRequest Abstract representation of a DELETE request.
ezcWebdavPropFindRequest Abstract representation of a PROPFIND request.
ezcWebdavMakeCollectionRequest Abstract representation of a MKCOL 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
ezcWebdavPropPatchRequest::__construct() Creates a new PROPPATCH request object. 
ezcWebdavCopyRequest::__construct() Creates a new COPY request object. 
ezcWebdavMoveRequest::__construct() Creates a new MOVE request object. 
ezcWebdavPutRequest::__construct() Creates a new PUT request object. 
ezcWebdavPropFindRequest::__construct() Creates a new PROPFIND request object. 
ezcWebdavMakeCollectionRequest::__construct() Creates a new MKCOL 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!

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