/** * @param string $value * @return $this */ public function __construct($value = null) { $this->init()->setValue($value)->setAttributes(Attributes::create()); return $this; }
/** * @param mixed $content * @return $this */ public function __construct($content = null) { $this->init(); $contents = Contents::create()->setElement($this); if ($content) { $contents->setContents(is_array($content) ? $content : array($content)); } $this->setAttributes(Attributes::create()); $this->setContent($contents); return $this; }