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

39 lines
597 B
PHP
Raw Normal View History

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