FML Update
This commit is contained in:
@ -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 JoinServer implements Element {
|
||||
class JoinServer extends Element {
|
||||
/*
|
||||
* Protected properties
|
||||
*/
|
||||
@ -22,7 +22,7 @@ class JoinServer implements Element {
|
||||
* Create a new JoinServer object
|
||||
*
|
||||
* @param string $login (optional) Server login
|
||||
* @return \FML\ManiaCode\JoinServer|static
|
||||
* @return static
|
||||
*/
|
||||
public static function create($login = null) {
|
||||
return new static($login);
|
||||
@ -43,7 +43,7 @@ class JoinServer implements Element {
|
||||
* Set the server login
|
||||
*
|
||||
* @param string $login Server login
|
||||
* @return \FML\ManiaCode\JoinServer|static
|
||||
* @return static
|
||||
*/
|
||||
public function setLogin($login) {
|
||||
$this->login = (string)$login;
|
||||
@ -57,7 +57,7 @@ class JoinServer implements Element {
|
||||
*
|
||||
* @param string $serverIp Server ip
|
||||
* @param int $serverPort Server port
|
||||
* @return \FML\ManiaCode\JoinServer|static
|
||||
* @return static
|
||||
*/
|
||||
public function setIp($serverIp, $serverPort) {
|
||||
$this->serverIp = (string)$serverIp;
|
||||
@ -70,7 +70,7 @@ class JoinServer implements Element {
|
||||
* @see \FML\ManiaCode\Element::render()
|
||||
*/
|
||||
public function render(\DOMDocument $domDocument) {
|
||||
$xmlElement = $domDocument->createElement($this->tagName);
|
||||
$xmlElement = parent::render($domDocument);
|
||||
if (is_null($this->serverIp)) {
|
||||
$loginElement = $domDocument->createElement('login', $this->login);
|
||||
$xmlElement->appendChild($loginElement);
|
||||
|
Reference in New Issue
Block a user