Webdav: ezcWebdavNamespaceRegistry
[ ]
[ Clients ] [ Plugin architecture ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavNamespaceRegistry
|
Class to map XML namespaces to their shortcuts. [
source]
Implemented Interfaces
- ArrayAccess (internal interface)
An instance of this class is used in
ezcWebdavXmlTool to keep track of used namespace shortcuts and the creation of new ones, if necessary.
Member Variables
|
protected array(string=>string) |
$namespaceMap
= array()
Maps namespace URIs to shortcuts.
1. array(
2. 'uri' => '<shortcut>',
3. // ...
4. )
|
|
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.
1. array(
2. '<shortcut>' => true,
3. // ...
4. )
|
Method Summary
|
public void |
__construct(
)
Create a new namespace registry. |
|
protected string |
newShortcut(
)
Creates a new namespace shortcut. |
Methods
__construct
void __construct(
)
Create a new namespace registry.
Registers the standard namespace 'DAV:' with the shortcut 'D', which is common in the RFC document.
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 shortcuts.
Last updated: Mon, 29 Jun 2009