2014-01-12 00:51:46 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FML\ManiaCode;
|
|
|
|
|
2014-04-13 18:21:40 +02:00
|
|
|
/**
|
|
|
|
* Base ManiaCode Element
|
|
|
|
*
|
2014-06-21 03:18:21 +02:00
|
|
|
* @author steeffeen
|
2014-04-13 18:21:40 +02:00
|
|
|
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
2014-06-21 03:18:21 +02:00
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
2014-04-13 18:21:40 +02:00
|
|
|
*/
|
2014-07-03 22:34:47 +02:00
|
|
|
abstract class Element {
|
|
|
|
/*
|
|
|
|
* Protected properties
|
|
|
|
*/
|
|
|
|
protected $tagName = 'element';
|
2014-01-12 00:51:46 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the ManiaCode Element
|
|
|
|
*
|
2014-06-21 03:18:21 +02:00
|
|
|
* @param \DOMDocument $domDocument The DOMDocument for which the Element should be rendered
|
2014-01-12 00:51:46 +01:00
|
|
|
* @return \DOMElement
|
|
|
|
*/
|
2014-07-03 22:34:47 +02:00
|
|
|
public function render(\DOMDocument $domDocument) {
|
|
|
|
$xmlElement = $domDocument->createElement($this->tagName);
|
|
|
|
return $xmlElement;
|
|
|
|
}
|
2014-01-12 00:51:46 +01:00
|
|
|
}
|