- Moved FML into core folder
- Endurance plugin - map class nbCheckpoints - added script callbacks registration
This commit is contained in:
1 parent
65394e165e
commit
7f1646f25d
65 files changed
+141
-4
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Elements;
|
||||
|
||||
/**
|
||||
* Class representing music
|
||||
*
|
||||
* @author steeffeen
|
||||
*/
|
||||
class Music implements Renderable {
|
||||
/**
|
||||
* Protected properties
|
||||
*/
|
||||
protected $data = '';
|
||||
protected $tagName = 'music';
|
||||
|
||||
/**
|
||||
* Set data
|
||||
*
|
||||
* @param string $data
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user