getNamespaces() public method

Returns all additional namespaces. Does not return the ones defined as constants in \PHPCR\NamespaceRegistryInterface
public getNamespaces ( ) : array
return array Associative array of prefix => uri
Ejemplo n.º 1
0
 /**
  * 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;
             }
         }
     }
 }
 /**
  * {@inheritDoc}
  */
 public function getNamespaces()
 {
     return $this->transport->getNamespaces();
 }