FML Update

This commit is contained in:
Steffen Schröder
2014-07-03 22:34:47 +02:00
parent edd62f0eb4
commit 8b3667b252
75 changed files with 392 additions and 370 deletions

View File

@ -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 AddBuddy implements Element {
class AddBuddy extends Element {
/*
* Protected properties
*/
@ -20,7 +20,7 @@ class AddBuddy implements Element {
* Create a new AddBuddy Element
*
* @param string $login (optional) Buddy login
* @return \FML\ManiaCode\AddBuddy|static
* @return static
*/
public static function create($login = null) {
return new static($login);
@ -41,7 +41,7 @@ class AddBuddy implements Element {
* Set the buddy login
*
* @param string $login Buddy login
* @return \FML\ManiaCode\AddBuddy|static
* @return static
*/
public function setLogin($login) {
$this->login = (string)$login;
@ -52,7 +52,7 @@ class AddBuddy implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$loginElement = $domDocument->createElement('login', $this->login);
$xmlElement->appendChild($loginElement);
return $xmlElement;