FML Update
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
namespace FML\ManiaCode;
|
||||
|
||||
/**
|
||||
* ManiaCode Element installing a Replay
|
||||
* ManiaCode Element installing a replay
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
@ -11,44 +11,43 @@ namespace FML\ManiaCode;
|
||||
*/
|
||||
class InstallReplay implements Element {
|
||||
/*
|
||||
* Protected Properties
|
||||
* Protected properties
|
||||
*/
|
||||
protected $tagName = 'install_replay';
|
||||
protected $name = '';
|
||||
protected $url = '';
|
||||
protected $name = null;
|
||||
protected $url = null;
|
||||
|
||||
/**
|
||||
* Create a new InstallReplay Element
|
||||
* Create a new InstallReplay object
|
||||
*
|
||||
* @param string $name (optional) Replay Name
|
||||
* @param string $url (optional) Replay Url
|
||||
* @return \FML\ManiaCode\InstallReplay
|
||||
* @param string $name (optional) Replay name
|
||||
* @param string $url (optional) Replay url
|
||||
* @return \FML\ManiaCode\InstallReplay|static
|
||||
*/
|
||||
public static function create($name = null, $url = null) {
|
||||
$installReplay = new InstallReplay($name, $url);
|
||||
return $installReplay;
|
||||
return new static($name, $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new InstallReplay Element
|
||||
* Construct a new InstallReplay 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\InstallReplay
|
||||
* @param string $name Replay name
|
||||
* @return \FML\ManiaCode\InstallReplay|static
|
||||
*/
|
||||
public function setName($name) {
|
||||
$this->name = (string)$name;
|
||||
@ -56,10 +55,10 @@ class InstallReplay implements Element {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Url of the Replay
|
||||
* Set the url of the replay
|
||||
*
|
||||
* @param string $url Replay Url
|
||||
* @return \FML\ManiaCode\InstallReplay
|
||||
* @param string $url Replay url
|
||||
* @return \FML\ManiaCode\InstallReplay|static
|
||||
*/
|
||||
public function setUrl($url) {
|
||||
$this->url = (string)$url;
|
||||
|
Reference in New Issue
Block a user