Webdav: ezcWebdavPropertyStorage
[ ]
[ Plugin architecture ]
[ ]
[ ]
[ ]
[ ]
Interface: ezcWebdavPropertyStorage
|
Interface to define interaction with property storage classes. [
source]
This interface defines how a property storage should react. It allows you to implemenet your whole own way of property storages (possibly lazy-loading?) and integrate it. A more common way would be to extend the shipped
ezcWebdavBasicPropertyStorage.
An instance of a class implementing this interface is used to manage WebDAV properties, namely instances of
ezcWebdavProperty. Properties are usually structured by their name and the namespace they belong to. The WebDAV RFC requires that proprties keep their order in some cases, what is reflected in all shipped implementations.
Parents
Countable
|
--ezcWebdavPropertyStorage
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 void |
detach(
$name, [$namespace = 'DAV:'] )
Detaches a property from the storage. |
|
public ezcWebdavPropertyStorage |
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 ezcWebdavPropertyStorage |
intersect(
$properties )
Intersection between two property storages. |
Methods
attach
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
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 |
|
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 |
|
diff
Diff two property storages.
Return the current property storage reduced by the elements in the given property storage.
Parameters
get
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
ezcWebdavPropertyStorage 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
Last updated: Wed, 28 Nov 2007