Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavServerConfiguration


Class ezcWebdavServerConfiguration

Class containing the configuration for a specific client.

An instance of this class represents the configuration of ezcWebdavServer for a specific client. The ezcWebdavServerConfigurationManager holds a default set of such objects, representing the configurations that are known by the Webdav component by default.

You can instantiate more objects of this class to add custom configurations and possibly even extend it to support more advanced features.

An object of this class can configure the ezcWebdavServer instances in the way that is suitable to serve the requests send by a certain client and to serialize proper responses for it, when requested by the ezcWebdavServerConfigurationManager through the configure() method.

The property $userAgentRegex determines the PCRE that is used to match against the User-Agent HTTP header. If the regex matches, the configuration is used to configure the ezcWebdavServer instance. The default regex will match always and therefore always as the last fallback and will make the server act RFC conform.

The $transport property represents the class to be instantiated as the transport layer. The default is ezcWebdavTransport, which is the RFC compliant transport implementation.

$xmlTool defaults to an instance of ezcWebdavXmlTool, but may be configured to be a class implementing the same interface or even an extended one. The premission is, that the corresponding ezcWebdavTransport and ezcWebdavPropertyHandler are able to use the instance of this class for XML handling purposes.

The property $propertyHandler is responsible for extraction of and serialization to XML of dead and live properties. This may be replaced, if a transport needs or provides non-conform property XML.

Source for this file: /Webdav/src/server_configuration.php

Version:   //autogen//


ezcWebdavPathFactory read/write $pathFactory
Object used to transform incoming request URIs into request paths, that can be handled by the ezcWebdavBackend. Default is ezcWebdavAutomaticPathFactory. This is the only place where an object is expected, since transport implementations should not rely on a specific path factory and that means 1 path factory can be used for all transport configurations.
string read/write $propertyHandlerClass
This property defines the ezcWebdavPropertyHandler class to use, when instanciating the ezcWebdavTransport in $transportClass. The class given here will receive $xmlTool as a parameter, to work with.
string read/write $transportClass
Transport class to instantiate when creating an instance of the transport layer configured in this object.
string read/write $userAgentRegex
PCRE that is used to match against the User-Agent header. If this regex matches, this configuration object is used to configure the ezcWebdavServer instance, according to the other properties.
string read/write $xmlToolClass
This property defines the ezcWebdavXmlTool instance to be used with the ezcWebdavTransport class configured in $transportClass and the ezcWebdavPropertyHandler class configured in $propertyHandlerClass.

Member Variables

protected array(string=>mixed) $properties = array()

Method Summary

public void __construct( [ $userAgentRegex = '(.*)'] , [ $transportClass = 'ezcWebdavTransport'] , [ $xmlToolClass = 'ezcWebdavXmlTool'] , [ $propertyHandlerClass = 'ezcWebdavPropertyHandler'] , [ $headerHandlerClass = 'ezcWebdavHeaderHandler'] , [ $pathFactory = null] )
Creates a new instance.
protected void checkClasses( )
Checks the availability of all classes to instantiate.
public void configure( $server )
Configures the server for handling a request.



void __construct( [string $userAgentRegex = '(.*)'] , [string $transportClass = 'ezcWebdavTransport'] , [string $xmlToolClass = 'ezcWebdavXmlTool'] , [string $propertyHandlerClass = 'ezcWebdavPropertyHandler'] , [string $headerHandlerClass = 'ezcWebdavHeaderHandler'] , [ezcWebdavPathFactory $pathFactory = null] )

Creates a new instance.

All parameters are strings, representing the specific classes to use, exception for $pathFactory, which must be a valid path factory instance. The classes defined in the other parameters will be set as properties and instantiated when a server configuration is requested through the configure() method, by the ezcWebdavServerConfigurationManager instance hold in ezcWebdavServer.

Name Type Description
$userAgentRegex string
$transportClass string
$xmlToolClass string
$propertyHandlerClass string
$headerHandlerClass string
$pathFactory ezcWebdavPathFactory


void checkClasses( )

Checks the availability of all classes to instantiate.

This method checks all classes stored in the configuration for existance and validity. If an error is found, an ezcBaseValueException is issued.

Type Description
ezcBaseValueException if a property does not contain a class valid to be used with this configuration class or if a given class does not exist.


void configure( ezcWebdavServer $server )

Configures the server for handling a request.

This method takes the instance of ezcWebdavServer in $server and configures this instance according to the configuration represented. After calling this method, the ezcWebdavServer instance in $server is ready to handle a request.

This method is not intended to be called directly, but by ezcWebdavServerConfigurationManager, when requested to configure the server.

Name Type Description
$server ezcWebdavServer
Documentation generated by phpDocumentor 1.4.3