Esempio n. 1
0
 public function add(AbstractTag $value)
 {
     if (!$value->getName()) {
         throw new \Exception("Cannot add tag with no name");
     }
     if (isset($this->value[$value->getName()])) {
         throw new \Exception("CompoundTag already has a tag with name `" . $value->getName() . "`");
     }
     $this->value[$value->getName()] = $value;
     return $this;
 }
Esempio n. 2
0
 public function handleEnd()
 {
     parent::handleEnd();
     if (!$this->reference) {
         return;
     }
     $this->reference->handleEnd();
     foreach ($this->reference->children as $_child) {
         $_child->handleEnd();
     }
 }
Esempio n. 3
0
 protected function before($attribs)
 {
     parent::before($attribs);
     $surface = $this->document->getSurface();
     $surface->save();
     $this->applyTransform($attribs);
 }
Esempio n. 4
0
File: A.php Progetto: adilab/html
 /**
  * 
  * @param string $url href attribute
  * @param string $text Tag inner
  */
 public function __construct($url, $text = NULL)
 {
     if (!$text) {
         $text = $url;
     }
     parent::__construct($text);
     $this->setAttribute('href', $url);
 }
Esempio n. 5
0
 /**
  * Constructs the url tag
  * @return null
  */
 public function __construct()
 {
     parent::__construct(self::NAME, true, false);
 }
Esempio n. 6
0
 /**
  * Constructs the italic tag
  * @return null
  */
 public function __construct()
 {
     parent::__construct(self::NAME);
 }
 public function __construct($content = '')
 {
     parent::__construct('author', $content);
 }
Esempio n. 8
0
 /**
  * Returns instance
  * 
  * @param string $data
  * @return self
  */
 public static function create($data = NULL)
 {
     return parent::__create($data);
 }
Esempio n. 9
0
File: Tag.php Progetto: adilab/html
 /**
  * 
  * @param string $name Tag name
  * @param string $data Inner value (only for paired tags)
  */
 public function __construct($name, $data = NULL)
 {
     parent::__construct($data);
     $this->name = $name;
 }
 /**
  * Creates a new tag
  * 
  * @param string $tagName the tag name
  * @param string $content the tags content
  */
 public function __construct($content = '')
 {
     parent::__construct('license', $content);
 }
Esempio n. 11
0
File: Img.php Progetto: adilab/html
 /**
  * 
  * @param string $url Url of picture
  */
 public function __construct($url)
 {
     parent::__construct();
     $this->setAttribute('src', $url);
 }