- Moved FML into core folder

- Endurance plugin
- map class nbCheckpoints
- added script callbacks registration
This commit is contained in:
Steffen Schröder
2013-11-25 19:46:29 +01:00
parent 65394e165e
commit 7f1646f25d
65 changed files with 141 additions and 4 deletions

View File

@ -0,0 +1,72 @@
<?php
namespace FML\Controls;
use FML\Types\Container;
use FML\Types\Renderable;
/**
* Class representing CMlFrame
*
* @author steeffeen
*/
class Frame extends Control implements Container {
/**
* Protected properties
*/
protected $children = array();
/**
* Construct a new frame control
*
* @param string $id
*/
public function __construct($id = null) {
parent::__construct($id);
$this->tagName = 'frame';
}
/**
*
* @see \FML\Types\Container::add()
* @return \FML\Controls\Frame
*/
public function add(Renderable $child) {
array_push($this->children, $child);
return $this;
}
/**
*
* @see \FML\Types\Container::removeChildren()
* @return \FML\Controls\Frame
*/
public function removeChildren() {
$this->children = array();
return $this;
}
/**
*
* @see \FML\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xml = parent::render($domDocument);
foreach ($this->children as $child) {
$childXml = $child->render($domDocument);
$xml->appendChild($childXml);
}
return $xml;
}
/**
* Return class name
*
* @return string
*/
public static function getClass() {
return __CLASS__;
}
}
?>