Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavFlaggedPropertyStorage

Webdav::ezcWebdavFlaggedPropertyStorage

Class ezcWebdavFlaggedPropertyStorage

Container class for ezcWebdavProperty objects with associated flags.

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 reside in.

The stored objects are associated with some user defined flags. Other then that the class behaves like ezcWebdavBasicPropertyStorage does.

Source for this file: /Webdav/src/property_storages/flagged.php

ezcWebdavBasicPropertyStorage
   |
   --ezcWebdavFlaggedPropertyStorage
Version:   //autogen//

Member Variables

protected array $flags = array()
Next ID for a element in the ordered property list, to generate valid IDs even when some contents has been removed.

Inherited Member Variables

From ezcWebdavBasicPropertyStorage
protected ezcWebdavBasicPropertyStorage::$properties
protected ezcWebdavBasicPropertyStorage::$propertyOrder
protected ezcWebdavBasicPropertyStorage::$propertyOrderNextId
protected ezcWebdavBasicPropertyStorage::$propertyOrderPosition

Method Summary

public void attach( $property , [ $flag = 0] )
Attaches a property to the storage.
public void detach( $name , [ $namespace = 'DAV:'] )
Detaches a property from the storage.
public mixed getFlag( $name , [ $namespace = 'DAV:'] )
Returns the flags for property.

Inherited Methods

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

Methods

attach

void attach( ezcWebdavProperty $property , [mixed $flag = 0] )

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 through the get() method. 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.

The $flags can be used to attach additional information to the property. This is used by ezcWebdavTransport when parsing a ezcWebavPropPatchRequest, to indicate what should happen with the affected property in the ezcWebdavBackend. Flags used there are:

The default for this parameter does not have a meaning in terms of ezcWebdavPropPatchRequest.

Parameters:
Name Type Description
$property ezcWebdavProperty
$flag mixed
Redefinition of:
Method Description
ezcWebdavBasicPropertyStorage::attach() Attaches a property to the storage.

detach

void detach( string $name , [string $namespace = 'DAV:'] )

Detaches a property from the storage.

Removes the property with the given $name and $namespace from the storage. If the property does not exist in the storage, the call is silently ignored. If no $namespace is given, the default namespace for live properties ('DAV:') is used.

Parameters:
Name Type Description
$name string
$namespace string
Redefinition of:
Method Description
ezcWebdavBasicPropertyStorage::detach() Detaches a property from the storage.

getFlag

mixed getFlag( string $name , [string $namespace = 'DAV:'] )

Returns the flags for property.

Returns the flags of a proerpty from the flagged property storage by the $name and optionally the $naemspace of the property. If no $namespace is given, the default namespace for live properties ('DAV:') is used.

The method returns 0, if no flag has been explicitly assigned, and null, if the property does not exist in the storage.

Parameters:
Name Type Description
$name string
$namespace string
Documentation generated by phpDocumentor 1.4.3