FML Update
This commit is contained in:
@ -5,9 +5,9 @@ namespace FML\ManiaCode;
|
||||
/**
|
||||
* ManiaCode Element viewing a Replay
|
||||
*
|
||||
* @author steeffeen
|
||||
* @author steeffeen
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class ViewReplay implements Element {
|
||||
/*
|
||||
@ -19,9 +19,9 @@ class ViewReplay implements Element {
|
||||
|
||||
/**
|
||||
* Create a new ViewReplay Element
|
||||
*
|
||||
*
|
||||
* @param string $name (optional) Replay Name
|
||||
* @param string $url (optional) Replay Url
|
||||
* @param string $url (optional) Replay Url
|
||||
* @return \FML\ManiaCode\ViewReplay
|
||||
*/
|
||||
public static function create($name = null, $url = null) {
|
||||
@ -33,7 +33,7 @@ class ViewReplay implements Element {
|
||||
* Construct a new ViewReplay Element
|
||||
*
|
||||
* @param string $name (optional) Replay Name
|
||||
* @param string $url (optional) Replay Url
|
||||
* @param string $url (optional) Replay Url
|
||||
*/
|
||||
public function __construct($name = null, $url = null) {
|
||||
if ($name !== null) {
|
||||
@ -51,7 +51,7 @@ class ViewReplay implements Element {
|
||||
* @return \FML\ManiaCode\ViewReplay
|
||||
*/
|
||||
public function setName($name) {
|
||||
$this->name = (string) $name;
|
||||
$this->name = (string)$name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -62,16 +62,15 @@ class ViewReplay implements Element {
|
||||
* @return \FML\ManiaCode\ViewReplay
|
||||
*/
|
||||
public function setUrl($url) {
|
||||
$this->url = (string) $url;
|
||||
$this->url = (string)$url;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \FML\ManiaCode\Element::render()
|
||||
*/
|
||||
public function render(\DOMDocument $domDocument) {
|
||||
$xmlElement = $domDocument->createElement($this->tagName);
|
||||
$xmlElement = $domDocument->createElement($this->tagName);
|
||||
$nameElement = $domDocument->createElement('name', $this->name);
|
||||
$xmlElement->appendChild($nameElement);
|
||||
$urlElement = $domDocument->createElement('url', $this->url);
|
||||
|
Reference in New Issue
Block a user