示例#1
0
 public function process()
 {
     if (!$this->isProcessed()) {
         $this->setAttribute('HREF', 'mailto:' . $this->getText());
     }
     return parent::process();
 }
示例#2
0
 public function process()
 {
     if (!$this->isProcessed()) {
         $charsetMetas = $this->find('META', array('CHARSET' => true));
         if (!count($charsetMetas)) {
             $this->prependChild(new MetaElement(array('CHARSET' => 'utf-8')));
         }
     }
     return parent::process();
 }
示例#3
0
 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->hasAttribute('REPEAT')) {
             $this->ignoreAttribute('REPEAT');
             $times = intval($this->getAttribute('REPEAT')) - 1;
             for ($i = 0; $i < $times; $i++) {
                 $this->getParent()->insertAfter($this, new self());
             }
         }
     }
     return parent::process();
 }
示例#4
0
 public function render($nice = false, $level = 0)
 {
     $html = '';
     if ($this->hasAttribute('VERSION')) {
         $this->ignoreAttribute('VERSION');
         //Doctype implementations
         switch ($this->getAttribute('VERSION')) {
             default:
             case 5:
                 $html = '<!doctype html>';
         }
     }
     return $html . parent::render($nice, $level);
 }
示例#5
0
 public function __construct(array $attributes = array())
 {
     parent::__construct('META', $attributes);
 }
示例#6
0
 public function process()
 {
     if (!$this->isProcessed()) {
         //Some things need to be done here, since the DOM is loaded completely at this point.
         //Pulling
         if ($this->hasAttribute('PULL')) {
             switch ($this->getAttribute('PULL')) {
                 case 'left':
                     $this->addClass('pull-left');
                     $this->getParent()->addClass('clearfix');
                     break;
                 case 'right':
                     $this->addClass('pull-right');
                     $this->getParent()->addClass('clearfix');
                     break;
                 case 'center':
                     $this->addClass('center-block');
                     break;
             }
         }
         $this->loadScriptsAndStyles();
     }
     return parent::process();
 }