Path

ez components / documentation / api reference / 2007.2beta1 / nopackagename


eZ Components 2007.2beta1

NoPackageName: ezcWebdavServerConfigurationManager

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcWebdavServerConfigurationManager

[source]

Implemented Interfaces

  • ArrayAccess (internal interface)
  • Iterator (internal interface)

Member Variables

protected array(int=>ezcWebdavServerConfiguration) $configurations = array()
Transport configurations to dispatch.

Method Summary

public void __construct( )
Creates a new dispatcher.
protected void checkOffset( $offset )
Checks the given $offset for validity.
protected void checkValue( $value )
Checks the given $value for validity.
public void configure( $server, $userAgent )
Configures the server for handling a request by the given User-Agent.
public mixed current( )
Implements current() for Iterator
public void insertBefore( $config, [$offset = 0] )
Inserts a configuration right before a certain offset.
public int key( )
Implements key() for Iterator
public mixed next( )
Implements next() for Iterator
public void offsetSet( $offset, $value )
Array set access.
public void rewind( )
Implements rewind() for Iterator
public boolean valid( )
Implements valid() for Iterator

Methods

__construct

void __construct( )
Creates a new dispatcher.
This creates a new dispatcher object and registers the default ezcWebdavServerConfiguration automatically. That means, all following should be added by $this->insertBefore() to ensure, this catchall will not break the transfer layer.

checkOffset

void checkOffset( int|null $offset )
Checks the given $offset for validity.
This method checks if the given $offset is either of type int, then larger 0 and not larger as the number of elements in $this->configurations, or null.
The method is primarily used in the ArrayAccess methods.

Parameters

Name Type Description
$offset int|null  

Throws

ClassDescription
ezcBaseValueException if the given $offset is not an an int with the given criteria and not null.

checkValue

void checkValue( ezcWebdavServerConfiguration|null $value )
Checks the given $value for validity.
This method checks if the given $value is either an instance of ezcWebdavServerConfiguration or null.
The method is primarily used in the ArrayAccess methods.

Parameters

Name Type Description
$value ezcWebdavServerConfiguration|null  

Throws

ClassDescription
ezcBaseValueException if the given $value is not an instance of ezcWebdavServerConfiguration or null.

configure

void configure( $server, mixed $userAgent )
Configures the server for handling a request by the given User-Agent.
This method is used by ezcWebdavServer to determine the correct ezcWebdavTransport for the current request. It returns the ezcWebdavTransport created by the ezcWebdavServerConfiguration which matched the submitted User-Agent header first.
Per default, the RFC compliant default implementation ezcWebdavTransport is configured to catch all User-Agent headers for which no specific implementation could be found. If this configuration has been removed or manipulated incorrectly, an ezcWebdavMissingTransportConfigurationException might be thrown.

Parameters

Name Type Description
$userAgent mixed  
$server  

Throws

ClassDescription
ezcWebdavMissingTransportConfigurationException if no ezcWebdavServerConfiguration could be found that matches the given $userAgent.

current

mixed current( )
Implements current() for Iterator

insertBefore

void insertBefore( $config, [int $offset = 0] )
Inserts a configuration right before a certain offset.
This method inserts a given $config right before the given $offset. The $offset must be of type integer and between 0 and the number of elements in $this->configurations minus 1.
If these preconditions do not match for the given $offset, an ezcBaseValueException is thrown.

Parameters

Name Type Description
$config ezcWebdavServerConfiguration  
$offset int  

Throws

ClassDescription
ezcBaseValueException if the given $offset is not an integer that is larger or equal to 0 and smaller than the number of elements in $this->configurations.

key

int key( )
Implements key() for Iterator

next

mixed next( )
Implements next() for Iterator

offsetSet

void offsetSet( string $offset, string $value )
Array set access.

Parameters

Name Type Description
$offset string  
$value string  

rewind

void rewind( )
Implements rewind() for Iterator

valid

boolean valid( )
Implements valid() for Iterator

Last updated: Wed, 28 Nov 2007