setName($name); } if ($file) { $this->setFile($file); } if ($url) { $this->setUrl($url); } } /** * Get the macroblock name * * @api * @return string */ public function getName() { return $this->name; } /** * Set the macroblock name * * @api * @param string $name Macroblock name * @return static */ public function setName($name) { $this->name = (string)$name; return $this; } /** * Get the macroblock file * * @api * @return string */ public function getFile() { return $this->file; } /** * Set the macroblock file * * @api * @param string $file Macroblock file * @return static */ public function setFile($file) { $this->file = (string)$file; return $this; } /** * Get the macroblock url * * @api * @return string */ public function getUrl() { return $this->url; } /** * Set the macroblock url * * @api * @param string $url Macroblock url * @return static */ public function setUrl($url) { $this->url = (string)$url; return $this; } /** * @see Element::render() */ public function render(\DOMDocument $domDocument) { $domElement = $domDocument->createElement("install_macroblock"); $nameElement = $domDocument->createElement("name", $this->name); $domElement->appendChild($nameElement); $fileElement = $domDocument->createElement("file", $this->file); $domElement->appendChild($fileElement); $urlElement = $domDocument->createElement("url", $this->url); $domElement->appendChild($urlElement); return $domElement; } }