Path

ez components / documentation / api reference / 2007.2alpha1 / webdav


eZ Components 2007.2alpha1

Webdav: ezcWebdavBasicPropertyStorage

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

Class: ezcWebdavBasicPropertyStorage

Class to manage instances of ezcWebdavProperty. [source]

Implemented Interfaces

An instance of this class is used to manage WebDAV properties, namely instances of ezcWebdavProperty. Properties are structured by their name and the namespace they belong to.

Descendents

Child Class Description
ezcWebdavFlaggedPropertyStorage Class to manage instances of ezcWebdavProperty with associated flags.

Member Variables

protected array $properties = array()
Stores the properties.
protected array $propertyOrder = array()
Stores a list of the assigned properties in the order they were assigned, to make this order accessible for the Iterator.
protected int $propertyOrderNextId = 0
Next ID for a element in the ordered property list, to generate valid IDs even when some contents has been removed.
protected int $propertyOrderPosition = 0
Current position of the iterator in the ordered property list.

Method Summary

public void attach( $property )
Attaches a property to the storage.
public bool contains( $name, [$namespace = 'DAV:'] )
Returns if the given property exists in the storage.
public int count( )
Return property count.
public mixed current( )
Implements current() for Iterator
public void detach( $name, [$namespace = 'DAV:'] )
Detaches a property from the storage.
public ezcWebdavBasicPropertyStorage diff( $properties )
Diff two property storages.
public ezcWebdavProperty|null get( $name, [$namespace = 'DAV:'] )
Returns a given property.
public array(string=>array(string=>ezcWebdavProperty)) getAllProperties( )
Returns all properties contained in the storage.
public array(string=>ezcWebdavProperty) getProperties( [$namespace = 'DAV:'] )
Returns all properties of a given namespace.
public ezcWebdavBasicPropertyStorage intersect( $properties )
Intersection between two property storages.
public int key( )
Implements key() for Iterator
public mixed next( )
Implements next() for Iterator
public void rewind( )
Implements rewind() for Iterator
public boolean valid( )
Implements valid() for Iterator

Methods

attach

void attach( ezcWebdavProperty $property )
Attaches a property to the storage.
Adds the given $property to the storage. The property can later be accessed by its name in combination with the namespace. Live properties (and only these) reside in the namespace DAV:, which is the default for all accessor methods.
If a property with the same namespace and name is already contained in the storage, it will be overwritten.

Parameters

Name Type Description
$property ezcWebdavProperty  

Redefined in descendants as

Method Description
ezcWebdavFlaggedPropertyStorage::attach() Attaches a property to the storage.

contains

bool contains( string $name, [string $namespace = 'DAV:'] )
Returns if the given property exists in the storage.
Returns if the property with the given name is contained in the storage. If the $namespace parameter is omited, the default DAV: namespace is used.

Parameters

Name Type Description
$name string  
$namespace string  

count

int count( )
Return property count.
Implementation required by interface Countable. Count the numbers of item contained by this class. Will return the item count ignoring their namespace.

current

mixed current( )
Implements current() for Iterator

detach

void detach( string $name, [string $namespace = 'DAV:'] )
Detaches a property from the storage.
Removes the property with the given $name from the storage. If the property did not exist in the storage, the call is silently ignored. If no $namespace is given, the default namespace DAV: is used.

Parameters

Name Type Description
$name string  
$namespace string  

Redefined in descendants as

Method Description
ezcWebdavFlaggedPropertyStorage::detach() Detaches a property from the storage.

diff

Diff two property storages.
Return the current property storage reduced by the elements in the given property storage.

Parameters

Name Type Description
$properties ezcWebdavBasicPropertyStorage  

get

ezcWebdavProperty|null get( string $name, [string $namespace = 'DAV:'] )
Returns a given property.
Returns the property with the given $name. If the $namespace parameter is omitted, the default DAV: namespace is used. If the desired property is not contained in the storage, null is returned.

Parameters

Name Type Description
$name string  
$namespace string  

getAllProperties

array(string=>array(string=>ezcWebdavProperty)) getAllProperties( )
Returns all properties contained in the storage.
Returns the complete array stored in $properties.

getProperties

array(string=>ezcWebdavProperty) getProperties( [ $namespace = 'DAV:'] )
Returns all properties of a given namespace.
The returned array is indexed by the property names. Live properties can be accessed by simply ommiting the $namespace parameter.

Parameters

Name Type Description
$namespace  

intersect

Intersection between two property storages.
Calculate and return ezcWebdavBasicPropertyStorage which returns the intersection of two property storages. This means a new property storage will be return which contains all values, which are present in the current and the gi ven property storage.

Parameters

Name Type Description
$properties ezcWebdavBasicPropertyStorage  

key

int key( )
Implements key() for Iterator

next

mixed next( )
Implements next() for Iterator

rewind

void rewind( )
Implements rewind() for Iterator

valid

boolean valid( )
Implements valid() for Iterator

Last updated: Mon, 12 Nov 2007