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 Replay
* ManiaCode Element playing a replay
*
* @author steeffeen <mail@steeffeen.com>
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
@ -11,44 +11,43 @@ namespace FML\ManiaCode;
*/
class PlayReplay implements Element {
/*
* Protected Properties
* Protected properties
*/
protected $tagName = 'play_replay';
protected $name = '';
protected $url = '';
protected $name = null;
protected $url = null;
/**
* Create a new PlayReplay Element
* Create a new PlayReplay object
*
* @param string $name (optional) Replay Name
* @param string $url (optional) Replay Url
* @return \FML\ManiaCode\PlayReplay
* @param string $name (optional) Replay name
* @param string $url (optional) Replay url
* @return \FML\ManiaCode\PlayReplay|static
*/
public static function create($name = null, $url = null) {
$playReplay = new PlayReplay($name, $url);
return $playReplay;
return new static($name, $url);
}
/**
* Construct a new PlayReplay Element
* Construct a new PlayReplay object
*
* @param string $name (optional) Replay Name
* @param string $url (optional) Replay Url
* @param string $name (optional) Replay name
* @param string $url (optional) Replay 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 Replay
* Set the name of the replay
*
* @param string $name Replay Name
* @return \FML\ManiaCode\PlayReplay
* @param string $name Replay name
* @return \FML\ManiaCode\PlayReplay|static
*/
public function setName($name) {
$this->name = (string)$name;
@ -56,10 +55,10 @@ class PlayReplay implements Element {
}
/**
* Set the Url of the Replay
* Set the url of the replay
*
* @param string $url Replay Url
* @return \FML\ManiaCode\PlayReplay
* @param string $url Replay url
* @return \FML\ManiaCode\PlayReplay|static
*/
public function setUrl($url) {
$this->url = (string)$url;