Webdav: ezcWebdavNamespaceRegistry
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavNamespaceRegistry
|
Class to map XML namespaces to their shortcuts. [
source]
Implemented Interfaces
- ArrayAccess (internal interface)
An instance of this class is used in
ezcWebdavTransport to keep track of used namespaces and create new ones, if necessary.
Member Variables
|
protected array(string=>string) |
$namespaceMap
= array()
Maps namespace URIs to shortcuts. |
|
protected string |
$shortcutBase
= 'ezc'
Base string to be used for new shortcuts. |
|
protected int |
$shortcutCounter
= 0
Counter to create new shortcuts. |
|
protected array(string=>bool) |
$usedShortcuts
= array()
Stores shortcuts that are already in use. |
Method Summary
|
public void |
__construct(
)
Create a new namespace registry. |
|
protected string |
newShortcut(
)
Creates a new namespace shortcut. |
|
public void |
offsetSet(
$offset, $value )
Array set access. |
Methods
__construct
void __construct(
)
Create a new namespace registry.
Registers the standard namespace 'DAV:' with the shortcut 'D'.
newShortcut
string newShortcut(
)
Creates a new namespace shortcut.
Produces a new shortcut for a namespace by using $this->shortcutBase and the first 5 characters of the MD5 hash of the current microtime. Only returns unused shortczus.
offsetSet
void offsetSet(
string
$offset, string
$value )
Array set access.
Parameters
| Name |
Type |
Description |
$offset |
string |
|
$value |
string |
|
Last updated: Mon, 12 Nov 2007