Webdav: ezcWebdavBasicPropertyStorage
[ ]
[ Clients ] [ Plugin architecture ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavBasicPropertyStorage
|
Container class for ezcWebdavProperty objects. [
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 reside in.
Descendents
Member Variables
|
protected array |
$properties
= array()
Stores the WebDAV properties.
The structure of this array is: 1. array(
2. 'DAV:' => array(
3. '<live property name>' => ezcWebdavLiveProperty,
4. // ...
5. ),
6. '<another namespace URI>'array(
7. '<dead property name>' => ezcWebdavDeadProperty,
8. // ...
9. ),
10. // ...
11. )
|
|
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 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. |
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
Redefined in descendants as
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 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 |
|
count
int count(
)
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.
current
Implements current() for Iterator.
Returns the currently selected element during iteration with foreach.
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 |
|
Redefined in descendants as
diff
Diff two property storages.
Returns a property storage, which does only contain properties that are not present in the $properties parameter.
Parameters
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
array(string=>array(string=>ezcWebdavProperty)) getAllProperties(
)
Returns all properties contained in the storage.
getProperties
array(string=>ezcWebdavProperty) getProperties(
[string
$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, 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
key
int key(
)
Implements key() for Iterator
Returns the key of the currently selected element during iteration with foreach.
next
mixed next(
)
Implements next() for Iterator
Advances the internal pointer to the next element during iteration with foreach.
rewind
void rewind(
)
Implements rewind() for Iterator
Resets the internal pointer to the first element before iteration with foreach.
valid
boolean valid(
)
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.
__clone
void __clone(
)
Clones the property storage deeply.
Last updated: Mon, 30 Mar 2009