Apache Zeta Components Manual :: Docs For Class ezcWebdavPropertyStorage
Webdav::ezcWebdavPropertyStorage
Interface ezcWebdavPropertyStorage
Interface to define interaction with property storage classes.
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.
Source for this file: /Webdav/src/interfaces/property_storage.php
Countable | --ezcWebdavPropertyStorage
Version: | //autogen// |
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 ezcWebdavBasicPropertyStorage |
diff(
$properties
)
Diff two property storages. |
public ezcWebdavProperty|null |
get(
$name
, [ $namespace
= 'DAV:'] )
Returns a property from the storage. |
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
)
Intersects 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 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.
Parameters:
Name | Type | Description |
---|---|---|
$property |
ezcWebdavProperty |
contains
Returns if the given property exists in the storage.
Returns if the property with the given $name and $namespace is contained in the storage. If the $namespace parameter is omited, the default live property namespace ('DAV:') is used.
Parameters:
Name | Type | Description |
---|---|---|
$name |
string | |
$namespace |
string |
detach
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 |
diff
Diff two property storages.
Returns a property storage, which does only contain properties that are not present in the $properties parameter.
Parameters:
Name | Type | Description |
---|---|---|
$properties |
ezcWebdavPropertyStorage |
get
Returns a property from the storage.
Returns the property with the given $name and $namespace. If the $namespace parameter is omitted, the default live property namespace ('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
Returns all properties contained in the storage.
Returns the complete array stored in $properties.
getProperties
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, since then the default namespace for live properties ('DAV:') is used.
Parameters:
Name | Type | Description |
---|---|---|
$namespace |
string |
intersect
Intersects between two property storages.
Calculate and return an instance of ezcWebdavBasicPropertyStorage which contains 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 given $properties property storage.
Parameters:
Name | Type | Description |
---|---|---|
$properties |
ezcWebdavPropertyStorage |