TrackManiaControl/application/core/FML/Elements/Music.php

41 lines
649 B
PHP
Raw Normal View History

<?php
namespace FML\Elements;
/**
* Class representing music
*
* @author steeffeen
*/
class Music implements Renderable {
/**
2013-12-31 02:55:19 +01:00
* Protected Properties
*/
protected $data = '';
protected $tagName = 'music';
/**
2013-12-31 02:55:19 +01:00
* Set Data Url
*
2013-12-31 02:55:19 +01:00
* @param string $data
* Media Url
* @return \FML\Elements\Music
*/
public function setData($data) {
$this->data = $data;
return $this;
}
/**
*
* @see \FML\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xml = $domDocument->createElement($this->tagName);
if ($this->data) {
$xml->setAttribute('data', $this->data);
}
return $xml;
}
}