Container class for ezcWebdavProperty objects.
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.
Source for this file: /Webdav/src/property_storages/basic.php
Version: | //autogen// |
Child Class | Description |
---|---|
ezcWebdavFlaggedPropertyStorage | Container class for ezcWebdavProperty objects with associated flags. |
protected array |
$properties
= array()
Stores the WebDAV properties. The structure of this array is:
|
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. |
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 ezcWebdavProperty |
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 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. |
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 |
public void |
__clone(
)
Clones the property storage deeply. |
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.
Name | Type | Description |
---|---|---|
$property |
ezcWebdavProperty |
Method | Description |
---|---|
ezcWebdavPropertyStorage::attach() |
Attaches a property to the storage. |
Method | Description |
---|---|
ezcWebdavFlaggedPropertyStorage::attach() |
Attaches a property to the storage. |
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.
Name | Type | Description |
---|---|---|
$name |
string | |
$namespace |
string |
Method | Description |
---|---|
ezcWebdavPropertyStorage::contains() |
Returns if the given property exists in the storage. |
Return property count.
Implementation required by interface Countable. Count the numbers of items contained by the instance. Will return the overall item count ignoring different namespaces.
Implements current() for Iterator.
Returns the currently selected element during iteration with foreach.
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.
Name | Type | Description |
---|---|---|
$name |
string | |
$namespace |
string |
Method | Description |
---|---|
ezcWebdavPropertyStorage::detach() |
Detaches a property from the storage. |
Method | Description |
---|---|
ezcWebdavFlaggedPropertyStorage::detach() |
Detaches a property from the storage. |
Diff two property storages.
Returns a property storage, which does only contain properties that are not present in the $properties parameter.
Name | Type | Description |
---|---|---|
$properties |
ezcWebdavPropertyStorage |
Method | Description |
---|---|
ezcWebdavPropertyStorage::diff() |
Diff two property storages. |
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.
Name | Type | Description |
---|---|---|
$name |
string | |
$namespace |
string |
Method | Description |
---|---|
ezcWebdavPropertyStorage::get() |
Returns a property from the storage. |
Returns all properties contained in the storage.
Returns the complete array stored in $properties.
Method | Description |
---|---|
ezcWebdavPropertyStorage::getAllProperties() |
Returns all properties contained in the storage. |
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.
Name | Type | Description |
---|---|---|
$namespace |
string |
Method | Description |
---|---|
ezcWebdavPropertyStorage::getProperties() |
Returns all properties of a given namespace. |
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.
Name | Type | Description |
---|---|---|
$properties |
ezcWebdavPropertyStorage |
Method | Description |
---|---|
ezcWebdavPropertyStorage::intersect() |
Intersects between two property storages. |
Implements key() for Iterator
Returns the key of the currently selected element during iteration with foreach.
Implements next() for Iterator
Advances the internal pointer to the next element during iteration with foreach.
Implements rewind() for Iterator
Resets the internal pointer to the first element before iteration with foreach.
Implements valid() for Iterator
Returns if the internal pointer still points to a valid element when iteration with foreach. If this method returns false, iteration ends.
Clones the property storage deeply.