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; }
public function handleEnd() { parent::handleEnd(); if (!$this->reference) { return; } $this->reference->handleEnd(); foreach ($this->reference->children as $_child) { $_child->handleEnd(); } }
protected function before($attribs) { parent::before($attribs); $surface = $this->document->getSurface(); $surface->save(); $this->applyTransform($attribs); }
/** * * @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); }
/** * Constructs the url tag * @return null */ public function __construct() { parent::__construct(self::NAME, true, false); }
/** * Constructs the italic tag * @return null */ public function __construct() { parent::__construct(self::NAME); }
public function __construct($content = '') { parent::__construct('author', $content); }
/** * Returns instance * * @param string $data * @return self */ public static function create($data = NULL) { return parent::__create($data); }
/** * * @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); }
/** * * @param string $url Url of picture */ public function __construct($url) { parent::__construct(); $this->setAttribute('src', $url); }