FML Update

This commit is contained in:
Steffen Schröder
2014-07-03 22:34:47 +02:00
parent edd62f0eb4
commit 8b3667b252
75 changed files with 392 additions and 370 deletions

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class InstallScript implements Element {
class InstallScript extends Element {
/*
* Protected properties
*/
@ -24,7 +24,7 @@ class InstallScript implements Element {
* @param string $name (optional) Script name
* @param string $file (optional) Script file
* @param string $url (optional) Script url
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public static function create($name = null, $file = null, $url = null) {
return new static($name, $file, $url);
@ -53,7 +53,7 @@ class InstallScript implements Element {
* Set the name of the script
*
* @param string $name Script name
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -64,7 +64,7 @@ class InstallScript implements Element {
* Set the file of the script
*
* @param string $file Script file
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public function setFile($file) {
$this->file = (string)$file;
@ -75,7 +75,7 @@ class InstallScript implements Element {
* Set the url of the script
*
* @param string $url Script url
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -86,7 +86,7 @@ class InstallScript implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$fileElement = $domDocument->createElement('file', $this->file);