Esempio n. 1
0
 /**
  * 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;
     }
 }
Esempio n. 2
0
 /**
  * Class contructor.
  */
 public function __construct()
 {
     parent::__construct('ztal', 'http://names.co.uk/namespaces/ztal');
     $this->addAttribute(new \PHPTAL_NamespaceAttributeSurround('data-attributes', 20));
 }
Esempio n. 3
0
 /**
  * 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;
     }
 }
 public function __construct()
 {
     parent::__construct('cake', self::NAMESPACE_URI);
     $this->addAttribute(new PHPTAL_NamespaceAttributeReplace('helper', 1));
 }