Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavNamespaceRegistry

Webdav::ezcWebdavNamespaceRegistry

Class ezcWebdavNamespaceRegistry

Class to map XML namespaces to their shortcuts.

An instance of this class is used in ezcWebdavXmlTool to keep track of used namespace shortcuts and the creation of new ones, if necessary.

Source for this file: /Webdav/src/namespace_registry.php

Implements interfaces:

  • ArrayAccess (internal interface)
Version:   //autogen//

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.

Documentation generated by phpDocumentor 1.4.3