/**
* Makes sure the namespaces are available.
*
* We are lazy and only load the namespaces when they are needed for the
* first time. This method has to be called by all methods that need to
* do something with user defined namespaces.
*
* @return void
*/
protected function lazyLoadNamespaces()
{
if ($this->userNamespaces === null) {
$namespaces = $this->transport->getNamespaces();
$this->userNamespaces = array();
foreach ($namespaces as $prefix => $uri) {
if (!array_key_exists($prefix, $this->defaultNamespaces)) {
$this->userNamespaces[$prefix] = $uri;
}
}
}
}