/** * Register a PHPTAL_Namespace and its attribute into PHPTAL. */ public function registerNamespace(PHPTAL_Namespace $ns) { $this->namespaces_by_uri[$ns->getNamespaceURI()] = $ns; $this->prefix_to_uri[$ns->getPrefix()] = $ns->getNamespaceURI(); $prefix = strtolower($ns->getPrefix()); foreach ($ns->getAttributes() as $name => $attribute) { $key = $prefix . ':' . strtolower($name); $this->_dictionary[$key] = $attribute; } }
/** * Register a PHPTAL_Namespace and its attribute into PHPTAL. */ public function registerNamespace(PHPTAL_Namespace $ns) { $nsname = strtolower($ns->name); $this->_namespaces[$nsname] = $ns; $this->_xmlns[$ns->xmlns] = $nsname; foreach ($ns->getAttributes() as $name => $attribute) { $key = $nsname . ':' . strtolower($name); $this->_dictionary[$key] = $attribute; } }