FML Update

This commit is contained in:
Steffen Schröder
2014-06-21 03:18:21 +02:00
parent 816ff486ef
commit c8d599189c
107 changed files with 2484 additions and 3099 deletions

View File

@ -3,7 +3,7 @@
namespace FML\ManiaCode;
/**
* ManiaCode Element playing a Map
* ManiaCode Element for playing a map
*
* @author steeffeen <mail@steeffeen.com>
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
@ -11,44 +11,43 @@ namespace FML\ManiaCode;
*/
class PlayMap implements Element {
/*
* Protected Properties
* Protected properties
*/
protected $tagName = 'play_map';
protected $name = '';
protected $url = '';
protected $name = null;
protected $url = null;
/**
* Create a new PlayMap Element
* Create a new PlayMap object
*
* @param string $name (optional) Map Name
* @param string $url (optional) Map Url
* @return \FML\ManiaCode\PlayMap
* @param string $name (optional) Map name
* @param string $url (optional) Map url
* @return \FML\ManiaCode\PlayMap|static
*/
public static function create($name = null, $url = null) {
$playMap = new PlayMap($name, $url);
return $playMap;
return new static($name, $url);
}
/**
* Construct a new PlayMap Element
* Construct a new PlayMap object
*
* @param string $name (optional) Map Name
* @param string $url (optional) Map Url
* @param string $name (optional) Map name
* @param string $url (optional) Map url
*/
public function __construct($name = null, $url = null) {
if ($name !== null) {
if (!is_null($name)) {
$this->setName($name);
}
if ($url !== null) {
if (!is_null($url)) {
$this->setUrl($url);
}
}
/**
* Set the Name of the Map
* Set the name of the map
*
* @param string $name Map Name
* @return \FML\ManiaCode\PlayMap
* @param string $name Map name
* @return \FML\ManiaCode\PlayMap|static
*/
public function setName($name) {
$this->name = (string)$name;
@ -56,10 +55,10 @@ class PlayMap implements Element {
}
/**
* Set the Url of the Map
* Set the url of the map
*
* @param string $url Map Url
* @return \FML\ManiaCode\PlayMap
* @param string $url Map url
* @return \FML\ManiaCode\PlayMap|static
*/
public function setUrl($url) {
$this->url = (string)$url;