Huge FML Update

This commit is contained in:
Steffen Schröder
2014-01-12 00:51:46 +01:00
parent 6a6fa56596
commit 345368df39
69 changed files with 2068 additions and 429 deletions

View File

@ -2,8 +2,10 @@
namespace FML\Elements;
use FML\Types\Renderable;
/**
* Class representing music
* Music Element
*
* @author steeffeen
*/
@ -11,18 +13,17 @@ class Music implements Renderable {
/**
* Protected Properties
*/
protected $data = '';
protected $tagName = 'music';
protected $data = '';
/**
* Set Data Url
*
* @param string $data
* Media Url
* @param string $data Media Url
* @return \FML\Elements\Music
*/
public function setData($data) {
$this->data = $data;
$this->data = (string) $data;
return $this;
}
@ -31,10 +32,10 @@ class Music implements Renderable {
* @see \FML\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xml = $domDocument->createElement($this->tagName);
$xmlElement = $domDocument->createElement($this->tagName);
if ($this->data) {
$xml->setAttribute('data', $this->data);
$xmlElement->setAttribute('data', $this->data);
}
return $xml;
return $xmlElement;
}
}