FML Update

This commit is contained in:
Steffen Schröder 2014-07-03 22:34:47 +02:00
parent edd62f0eb4
commit 8b3667b252
75 changed files with 392 additions and 370 deletions

View File

@ -43,7 +43,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
* Set the name
*
* @param string $name CheckBox name
* @return \FML\Components\CheckBox|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -54,7 +54,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
* Set the default value
*
* @param bool $default Default value
* @return \FML\Components\CheckBox|static
* @return static
*/
public function setDefault($default) {
$this->feature->setDefault($default);
@ -66,7 +66,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
*
* @param string $style Style name or image url
* @param string $subStyle SubStyle name
* @return \FML\Components\CheckBox|static
* @return static
*/
public function setEnabledDesign($style, $subStyle = null) {
if (is_object($style) && ($style instanceof CheckBoxDesign)) {
@ -83,7 +83,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
*
* @param string $style Style name or image url
* @param string $subStyle SubStyle name
* @return \FML\Components\CheckBox|static
* @return static
*/
public function setDisabledDesign($style, $subStyle = null) {
if (is_object($style) && ($style instanceof CheckBoxDesign)) {
@ -99,7 +99,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
* Set the CheckBox Quad
*
* @param Quad $quad CheckBox Quad
* @return \FML\Components\CheckBox|static
* @return static
*/
public function setQuad(Quad $quad = null) {
$this->feature->setQuad($quad);
@ -129,7 +129,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
}
/**
* @see \ManiaControl\Types\Renderable::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$frame = new Frame();
@ -147,7 +147,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
/**
* Build the hidden Entry
*
* @return Entry
* @return \FML\Controls\Entry
*/
protected function buildEntry() {
$entry = new Entry();

View File

@ -44,7 +44,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
* Set Name
*
* @param string $name ValuePicker name
* @return \FML\Components\ValuePicker|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -55,7 +55,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
* Set the possible values
*
* @param array $values Possible values
* @return \FML\Components\ValuePicker|static
* @return static
*/
public function setValues(array $values) {
$this->feature->setValues($values);
@ -66,7 +66,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
* Set the default value
*
* @param bool $default Default value
* @return \FML\Components\ValuePicker|static
* @return static
*/
public function setDefault($default) {
$this->feature->setDefault($default);
@ -77,7 +77,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
* Set the ValuePicker Label
*
* @param Label $label ValuePicker Label
* @return \FML\Components\ValuePicker|static
* @return static
*/
public function setLabel(Label $label = null) {
$this->feature->setLabel($label);
@ -106,7 +106,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
}
/**
* @see \ManiaControl\Types\Renderable::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$frame = new Frame();
@ -124,7 +124,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
/**
* Build the hidden Entry
*
* @return Entry
* @return \FML\Controls\Entry
*/
protected function buildEntry() {
$entry = new Entry();

View File

@ -59,7 +59,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Create a new Control object
*
* @param string $controlId (optional) Control id
* @return \FML\Controls\Control|static
* @return static
*/
public static function create($controlId = null) {
return new static($controlId);
@ -80,7 +80,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Check Id for dangerous characters and assign a new unique id if necessary
*
* @param bool $forceNewId (optional) Whether to force setting a newly generated id
* @return \FML\Controls\Control|static
* @return static
*/
public function checkId($forceNewId = false) {
if ($forceNewId || !$this->getId()) {
@ -123,7 +123,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set Control id
*
* @param string $controlId Control id
* @return \FML\Controls\Control|static
* @return static
*/
public function setId($controlId) {
$this->controlId = (string)$controlId;
@ -136,7 +136,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* @param float $posX Horizontal position
* @param float $posY Vertical position
* @param float $posZ (optional) Depth
* @return \FML\Controls\Control|static
* @return static
*/
public function setPosition($posX, $posY, $posZ = null) {
$this->setX($posX);
@ -151,7 +151,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set X position
*
* @param float $posX Horizontal position
* @return \FML\Controls\Control|static
* @return static
*/
public function setX($posX) {
$this->posX = (float)$posX;
@ -162,7 +162,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set Y position
*
* @param float $posY Vertical position
* @return \FML\Controls\Control|static
* @return static
*/
public function setY($posY) {
$this->posY = (float)$posY;
@ -173,7 +173,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set Z position
*
* @param float $posZ Depth
* @return \FML\Controls\Control|static
* @return static
*/
public function setZ($posZ) {
$this->posZ = (float)$posZ;
@ -185,7 +185,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
*
* @param float $width Control width
* @param float $height Control height
* @return \FML\Controls\Control|static
* @return static
*/
public function setSize($width, $height) {
$this->setWidth($width);
@ -197,7 +197,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set Control width
*
* @param float $width Control width
* @return \FML\Controls\Control|static
* @return static
*/
public function setWidth($width) {
$this->width = (float)$width;
@ -208,7 +208,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set Control height
*
* @param float $height Control height
* @return \FML\Controls\Control|static
* @return static
*/
public function setHeight($height) {
$this->height = (float)$height;
@ -218,7 +218,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
/**
* Center alignment
*
* @return \FML\Controls\Control|static
* @return static
*/
public function centerAlign() {
$this->setAlign(self::CENTER, self::CENTER2);
@ -230,7 +230,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
*
* @param string $hAlign Horizontal alignment
* @param string $vAlign Vertical alignment
* @return \FML\Controls\Control|static
* @return static
*/
public function setAlign($hAlign, $vAlign) {
$this->setHAlign($hAlign);
@ -242,7 +242,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set horizontal alignment
*
* @param string $hAlign Horizontal alignment
* @return \FML\Controls\Control|static
* @return static
*/
public function setHAlign($hAlign) {
$this->hAlign = (string)$hAlign;
@ -253,7 +253,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set vertical alignment
*
* @param string $vAlign Vertical alignment
* @return \FML\Controls\Control|static
* @return static
*/
public function setVAlign($vAlign) {
$this->vAlign = (string)$vAlign;
@ -263,7 +263,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
/**
* Reset alignment
*
* @return \FML\Controls\Control|static
* @return static
*/
public function resetAlign() {
$this->setAlign(null, null);
@ -274,7 +274,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set Control scale
*
* @param float $scale Control scale
* @return \FML\Controls\Control|static
* @return static
*/
public function setScale($scale) {
$this->scale = (float)$scale;
@ -285,7 +285,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Set visibility
*
* @param bool $visible Whether the Control should be visible
* @return \FML\Controls\Control|static
* @return static
*/
public function setVisible($visible = true) {
$this->hidden = ($visible ? 0 : 1);
@ -295,8 +295,8 @@ abstract class Control implements Renderable, ScriptFeatureable {
/**
* Set Control rotation
*
* @param float $rotation
* @return \FML\Controls\Control|static
* @param float $rotation Control rotation
* @return static
*/
public function setRotation($rotation) {
$this->rotation = (float)$rotation;
@ -307,7 +307,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Add a new class name
*
* @param string $class Class name
* @return \FML\Controls\Control|static
* @return static
*/
public function addClass($class) {
$class = (string)$class;
@ -322,7 +322,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
*
* @param string $actionName Action to trigger
* @param string $eventLabel (optional) Event on which the action is triggered
* @return \FML\Controls\Control|static
* @return static
*/
public function addActionTriggerFeature($actionName, $eventLabel = ScriptLabel::MOUSECLICK) {
if (is_object($actionName) && ($actionName instanceof ActionTrigger)) {
@ -338,7 +338,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Add a new Script Feature
*
* @param ScriptFeature $scriptFeature Script Feature
* @return \FML\Controls\Control|static
* @return static
*/
public function addScriptFeature(ScriptFeature $scriptFeature) {
if (!in_array($scriptFeature, $this->scriptFeatures, true)) {
@ -351,7 +351,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* Add a dynamic Feature opening the current map info
*
* @param string $eventLabel (optional) Event on which the map info will be opened
* @return \FML\Controls\Control|static
* @return static
*/
public function addMapInfoFeature($eventLabel = ScriptLabel::MOUSECLICK) {
$mapInfo = new MapInfo($this, $eventLabel);
@ -364,7 +364,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
*
* @param string $login Login of the player
* @param string $eventLabel (optional) Event on which the player profile will be opened
* @return \FML\Controls\Control|static
* @return static
*/
public function addPlayerProfileFeature($login, $eventLabel = ScriptLabel::MOUSECLICK) {
$playerProfile = new PlayerProfile($login, $this, $eventLabel);
@ -378,7 +378,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* @param string $soundName UISound name
* @param int $variant (optional) Sound variant
* @param string $eventLabel (optional) Event on which the sound will be played
* @return \FML\Controls\Control|static
* @return static
*/
public function addUISoundFeature($soundName, $variant = 0, $eventLabel = ScriptLabel::MOUSECLICK) {
$uiSound = new UISound($soundName, $this, $variant, $eventLabel);
@ -393,7 +393,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* @param string $labelName (optional) Script label name
* @param bool $onlyShow (optional) Whether it should only show the Control but not toggle
* @param bool $onlyHide (optional) Whether it should only hide the Control but not toggle
* @return \FML\Controls\Control|static
* @return static
*/
public function addToggleFeature(Control $toggledControl, $labelName = Scriptlabel::MOUSECLICK, $onlyShow = false, $onlyHide = false) {
$toggle = new Toggle($this, $toggledControl, $labelName, $onlyShow, $onlyHide);
@ -407,7 +407,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* @param Control $tooltipControl Tooltip Control
* @param bool $stayOnClick (optional) Whether the Tooltip should stay on click
* @param bool $invert (optional) Whether the visibility toggling should be inverted
* @return \FML\Controls\Control|static
* @return static
*/
public function addTooltipFeature(Control $tooltipControl, $stayOnClick = false, $invert = false) {
$tooltip = new Tooltip($this, $tooltipControl, $stayOnClick, $invert);
@ -422,7 +422,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
* @param string $text Text to display on the Tooltip Label
* @param bool $stayOnClick (optional) Whether the Tooltip should stay on click
* @param bool $invert (optional) Whether the visibility toggling should be inverted
* @return \FML\Controls\Control|static
* @return static
*/
public function addTooltipLabelFeature(Label $tooltipControl, $text, $stayOnClick = false, $invert = false) {
$tooltip = new Tooltip($this, $tooltipControl, $stayOnClick, $invert, $text);
@ -435,7 +435,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
*
* @param string $scriptText Script text
* @param string $label (optional) Script label name
* @return \FML\Controls\Control|static
* @return static
*/
public function addScriptText($scriptText, $label = ScriptLabel::MOUSECLICK) {
$customText = new ControlScript($this, $scriptText, $label);
@ -446,7 +446,7 @@ abstract class Control implements Renderable, ScriptFeatureable {
/**
* Remove all Script Features
*
* @return \FML\Controls\Control|static
* @return static
*/
public function removeScriptFeatures() {
$this->scriptFeatures = array();

View File

@ -52,7 +52,7 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
* Set Entry name
*
* @param string $name Entry name
* @return \FML\Controls\Entry
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -72,7 +72,7 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
* Set default value
*
* @param string $default Default value
* @return \FML\Controls\Entry|static
* @return static
*/
public function setDefault($default) {
$this->default = $default;
@ -139,7 +139,7 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
* Set auto completion
*
* @param bool $autoComplete Whether the default value should be automatically completed based on the current request parameters
* @return \FML\Controls\Entry|static
* @return static
*/
public function setAutoComplete($autoComplete) {
$this->autoComplete = (bool)$autoComplete;
@ -150,7 +150,7 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
* Add a dynamic Feature submitting the Entry
*
* @param string $url Submit url
* @return \FML\Controls\Entry|static
* @return static
*/
public function addSubmitFeature($url) {
$entrySubmit = new EntrySubmit($this, $url);
@ -159,7 +159,7 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
}
/**
* @see \FML\Control::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);

View File

@ -28,7 +28,7 @@ class FileEntry extends Entry {
* Set the base folder
*
* @param string $folder Base folder
* @return \FML\Controls\FileEntry|static
* @return static
*/
public function setFolder($folder) {
$this->folder = (string)$folder;
@ -36,7 +36,7 @@ class FileEntry extends Entry {
}
/**
* @see \FML\Entry::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);

View File

@ -82,7 +82,7 @@ class Frame extends Control implements Container {
}
/**
* @see \FML\Renderable::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);

View File

@ -41,7 +41,7 @@ class Frame3d extends Frame implements Scriptable {
* Set Style3d id
*
* @param string $style3dId Style3d id
* @return \FML\Controls\Frame3d|static
* @return static
*/
public function setStyle3dId($style3dId) {
$this->style3dId = (string)$style3dId;
@ -53,7 +53,7 @@ class Frame3d extends Frame implements Scriptable {
* Set Style3d
*
* @param Style3d $style3d Style3d object
* @return \FML\Controls\Frame3d|static
* @return static
*/
public function setStyle3d(Style3d $style3d) {
$this->style3d = $style3d;
@ -70,7 +70,7 @@ class Frame3d extends Frame implements Scriptable {
}
/**
* @see \FML\Controls\Frame::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);

View File

@ -26,7 +26,7 @@ class FrameInstance extends Control {
*
* @param string $modelId (optional) Frame Model id
* @param string $controlId (optional) Frame id
* @return \FML\Controls\FrameInstance|static
* @return static
*/
public static function create($modelId = null, $controlId = null) {
return new static($modelId, $controlId);
@ -49,7 +49,7 @@ class FrameInstance extends Control {
* Set Frame Model id
*
* @param string $modelId Frame Model id
* @return \FML\Controls\FrameInstance|static
* @return static
*/
public function setModelId($modelId) {
$this->modelId = (string)$modelId;
@ -61,7 +61,7 @@ class FrameInstance extends Control {
* Set Frame Model
*
* @param FrameModel $frameModel Frame Model
* @return \FML\Controls\FrameInstance|static
* @return static
*/
public function setModel(FrameModel $frameModel) {
$this->model = $frameModel;

View File

@ -46,7 +46,7 @@ class Gauge extends Control implements Styleable {
* Set ratio
*
* @param float $ratio Ratio value
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setRatio($ratio) {
$this->ratio = (float)$ratio;
@ -57,7 +57,7 @@ class Gauge extends Control implements Styleable {
* Set grading
*
* @param float $grading Grading value
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setGrading($grading) {
$this->grading = (float)$grading;
@ -68,7 +68,7 @@ class Gauge extends Control implements Styleable {
* Set color
*
* @param string $color Gauge color
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setColor($color) {
$this->color = (string)$color;
@ -79,7 +79,7 @@ class Gauge extends Control implements Styleable {
* Set rotation
*
* @param float $rotation Gauge rotation
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setRotation($rotation) {
$this->rotation = (float)$rotation;
@ -90,7 +90,7 @@ class Gauge extends Control implements Styleable {
* Set centered
*
* @param bool $centered Whether the Gauge is centered
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setCentered($centered) {
$this->centered = ($centered ? 1 : 0);
@ -101,7 +101,7 @@ class Gauge extends Control implements Styleable {
* Set clan
*
* @param int $clan Clan number
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setClan($clan) {
$this->clan = (int)$clan;
@ -112,7 +112,7 @@ class Gauge extends Control implements Styleable {
* Set draw background
*
* @param bool $drawBg Whether the Gauges background should be drawn
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setDrawBg($drawBg) {
$this->drawBg = ($drawBg ? 1 : 0);
@ -123,7 +123,7 @@ class Gauge extends Control implements Styleable {
* Set draw block background
*
* @param bool $drawBlockBg Whether the Gauges block background should be drawn
* @return \FML\Controls\Gauge|static
* @return static
*/
public function setDrawBlockBg($drawBlockBg) {
$this->drawBlockBg = ($drawBlockBg ? 1 : 0);

View File

@ -55,7 +55,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* Set text
*
* @param string $text Text value
* @return \FML\Controls\Label|static
* @return static
*/
public function setText($text) {
$this->text = (string)$text;
@ -66,7 +66,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* Set text id to use from Dico
*
* @param string $textId Text id
* @return \FML\Controls\Label|static
* @return static
*/
public function setTextId($textId) {
$this->textId = (string)$textId;
@ -77,7 +77,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* Set text prefix
*
* @param string $textPrefix Text prefix
* @return \FML\Controls\Label|static
* @return static
*/
public function setTextPrefix($textPrefix) {
$this->textPrefix = (string)$textPrefix;
@ -88,7 +88,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* Set text emboss
*
* @param bool $textEmboss Whether the text should be embossed
* @return \FML\Controls\Label|static
* @return static
*/
public function setTextEmboss($textEmboss) {
$this->textEmboss = ($textEmboss ? 1 : 0);
@ -99,7 +99,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* Set translate
*
* @param bool $translate Whether the text should be translated
* @return \FML\Controls\Label|static
* @return static
*/
public function setTranslate($translate) {
$this->translate = ($translate ? 1 : 0);
@ -110,7 +110,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* Set max lines count
*
* @param int $maxLines Max lines count
* @return \FML\Controls\Label|static
* @return static
*/
public function setMaxLines($maxLines) {
$this->maxLines = (int)$maxLines;
@ -233,7 +233,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
*
* @param bool $showSeconds (optional) Whether the seconds should be shown
* @param bool $showFullDate (optional) Whether the date should be shown
* @return \FML\Controls\Label|static
* @return static
*/
public function addClockFeature($showSeconds = true, $showFullDate = false) {
$clock = new Clock($this, $showSeconds, $showFullDate);

View File

@ -52,7 +52,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Set image url
*
* @param string $image Image url
* @return \FML\Controls\Quad|static
* @return static
*/
public function setImage($image) {
$this->image = (string)$image;
@ -63,7 +63,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Set image id to use from Dico
*
* @param string $imageId Image id
* @return \FML\Controls\Quad|static
* @return static
*/
public function setImageId($imageId) {
$this->imageId = (string)$imageId;
@ -74,7 +74,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Set focus image url
*
* @param string $imageFocus Focus image url
* @return \FML\Controls\Quad|static
* @return static
*/
public function setImageFocus($imageFocus) {
$this->imageFocus = (string)$imageFocus;
@ -85,7 +85,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Set focus image id to use from Dico
*
* @param string $imageFocusId Focus image id
* @return \FML\Controls\Quad|static
* @return static
*/
public function setImageFocusId($imageFocusId) {
$this->imageFocusId = (string)$imageFocusId;
@ -96,7 +96,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Set colorization
*
* @param string $colorize Colorize value
* @return \FML\Controls\Quad|static
* @return static
*/
public function setColorize($colorize) {
$this->colorize = (string)$colorize;
@ -107,7 +107,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Set modulization
*
* @param string $modulizeColor Modulize value
* @return \FML\Controls\Quad|static
* @return static
*/
public function setModulizeColor($modulizeColor) {
$this->modulizeColor = (string)$modulizeColor;
@ -118,7 +118,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Disable the automatic image scaling
*
* @param bool $autoScale Whether the image should scale automatically
* @return \FML\Controls\Quad|static
* @return static
*/
public function setAutoScale($autoScale) {
$this->autoScale = ($autoScale ? 1 : 0);
@ -225,7 +225,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Apply the given CheckBox Design
*
* @param CheckBoxDesign $checkBoxDesign CheckBox Design
* @return \FML\Controls\Quad|static
* @return static
*/
public function applyCheckBoxDesign(CheckBoxDesign $checkBoxDesign) {
$checkBoxDesign->applyToQuad($this);

View File

@ -27,7 +27,7 @@ class CustomUI {
/**
* Create a new CustomUI object
*
* @return \FML\CustomUI|static
* @return static
*/
public static function create() {
return new static();
@ -37,7 +37,7 @@ class CustomUI {
* Set XML encoding
*
* @param string $encoding XML encoding
* @return \FML\CustomUI|static
* @return static
*/
public function setXMLEncoding($encoding) {
$this->encoding = (string)$encoding;
@ -48,7 +48,7 @@ class CustomUI {
* Set showing of notices
*
* @param bool $visible Whether notices should be shown
* @return \FML\CustomUI|static
* @return static
*/
public function setNoticeVisible($visible) {
$this->noticeVisible = $visible;
@ -59,7 +59,7 @@ class CustomUI {
* Set showing of the challenge info
*
* @param bool $visible Whether the challenge info should be shown
* @return \FML\CustomUI|static
* @return static
*/
public function setChallengeInfoVisible($visible) {
$this->challengeInfoVisible = $visible;
@ -70,7 +70,7 @@ class CustomUI {
* Set showing of the net infos
*
* @param bool $visible Whether the net infos should be shown
* @return \FML\CustomUI|static
* @return static
*/
public function setNetInfosVisible($visible) {
$this->netInfosVisible = $visible;
@ -81,7 +81,7 @@ class CustomUI {
* Set showing of the chat
*
* @param bool $visible Whether the chat should be shown
* @return \FML\CustomUI|static
* @return static
*/
public function setChatVisible($visible) {
$this->chatVisible = $visible;
@ -92,7 +92,7 @@ class CustomUI {
* Set showing of the checkpoint list
*
* @param bool $visible Whether the checkpoint should be shown
* @return \FML\CustomUI|static
* @return static
*/
public function setCheckpointListVisible($visible) {
$this->checkpointListVisible = $visible;
@ -103,7 +103,7 @@ class CustomUI {
* Set showing of round scores
*
* @param bool $visible Whether the round scores should be shown
* @return \FML\CustomUI|static
* @return static
*/
public function setRoundScoresVisible($visible) {
$this->roundScoresVisible = $visible;
@ -114,7 +114,7 @@ class CustomUI {
* Set showing of the scoretable
*
* @param bool $visible Whether the scoretable should be shown
* @return \FML\CustomUI|static
* @return static
*/
public function setScoretableVisible($visible) {
$this->scoretableVisible = $visible;
@ -125,7 +125,7 @@ class CustomUI {
* Set global showing
*
* @param bool $visible Whether the UI should be disabled completely
* @return \FML\CustomUI|static
* @return static
*/
public function setGlobalVisible($visible) {
$this->globalVisible = $visible;

View File

@ -159,7 +159,7 @@ class Dico {
/**
* Create a new Dictionary object
*
* @return \FML\Elements\Dico|static
* @return static
*/
public static function create() {
return new static();
@ -171,7 +171,7 @@ class Dico {
* @param string $language Language id
* @param string $entryId Entry id
* @param string $entryValue Translated entry value
* @return \FML\Elements\Dico|static
* @return static
*/
public function setEntry($language, $entryId, $entryValue) {
$language = (string)$language;
@ -195,7 +195,7 @@ class Dico {
*
* @param string $entryId Entry id that should be removed
* @param string $language (optional) Only remove entries of the given language
* @return \FML\Elements\Dico|static
* @return static
*/
public function removeEntry($entryId, $language = null) {
$entryId = (string)$entryId;
@ -219,7 +219,7 @@ class Dico {
*
* @param string $language Language which entries should be removed
* @param string $entryId (optional) Only remove the given entry id
* @return \FML\Elements\Dico|static
* @return static
*/
public function removeLanguage($language, $entryId = null) {
$language = (string)$language;
@ -237,7 +237,7 @@ class Dico {
/**
* Remove all entries from the Dictionary
*
* @return \FML\Elements\Dico|static
* @return static
*/
public function removeEntries() {
$this->entries = array();

View File

@ -29,7 +29,7 @@ class Format implements BgColorable, Renderable, Styleable, TextFormatable {
/**
* Create a new Format Element
*
* @return \FML\Elements\Format|static
* @return static
*/
public static function create() {
return new static();
@ -84,7 +84,7 @@ class Format implements BgColorable, Renderable, Styleable, TextFormatable {
}
/**
* @see \FML\Renderable::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$formatXmlElement = $domDocument->createElement($this->tagName);

View File

@ -28,7 +28,7 @@ class FrameModel implements Container, Renderable {
* Set Model id
*
* @param string $modelId Model id
* @return \FML\Elements\FrameModel|static
* @return static
*/
public function setId($modelId) {
$this->modelId = (string)$modelId;
@ -51,7 +51,7 @@ class FrameModel implements Container, Renderable {
*/
public function checkId() {
if (!$this->modelId) {
$this->setId(new UniqueID());
$this->setId(UniqueID::create());
}
return $this;
}

View File

@ -22,7 +22,7 @@ class Including implements Renderable {
* Create a new Include object
*
* @param string $url (optional) Include url
* @return \FML\Elements\Including|static
* @return static
*/
public static function create($url = null) {
return new static($url);
@ -43,7 +43,7 @@ class Including implements Renderable {
* Set url
*
* @param string $url Include url
* @return \FML\Elements\Including|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -51,7 +51,7 @@ class Including implements Renderable {
}
/**
* @see \FML\Renderable::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);

View File

@ -22,7 +22,7 @@ class Music implements Renderable {
* Create a new Music object
*
* @param string $data (optional) Media url
* @return \FML\Elements\Music|static
* @return static
*/
public static function create($data = null) {
return new static($data);
@ -43,7 +43,7 @@ class Music implements Renderable {
* Set data url
*
* @param string $data Data url
* @return \FML\Elements\Music|static
* @return static
*/
public function setData($data) {
$this->data = (string)$data;
@ -51,7 +51,7 @@ class Music implements Renderable {
}
/**
* @see \FML\Renderable::render()
* @see \FML\Types\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);

View File

@ -22,7 +22,7 @@ class SimpleScript implements Renderable {
* Create a new SimpleScript object
*
* @param string $text (optional) Script text
* @return \FML\Elements\SimpleScript|static
* @return static
*/
public static function create($text = null) {
return new static($text);
@ -43,7 +43,7 @@ class SimpleScript implements Renderable {
* Set script text
*
* @param string $text Complete script text
* @return \FML\Script\Script|static
* @return static
*/
public function setText($text) {
$this->text = (string)$text;

View File

@ -39,7 +39,7 @@ class ManiaCode {
/**
* Create a new ManiaCode object
*
* @return \FML\ManiaCode|static
* @return static
*/
public static function create() {
return new static();
@ -49,7 +49,7 @@ class ManiaCode {
* Set XML encoding
*
* @param string $encoding XML encoding
* @return \FML\ManiaCode|static
* @return static
*/
public function setXmlEncoding($encoding) {
$this->encoding = (string)$encoding;
@ -60,7 +60,7 @@ class ManiaCode {
* Disable the showing of the confirmation at the end of the ManiaCode
*
* @param bool $disable Whether the confirmation should be shown
* @return \FML\ManiaCode|static
* @return static
*/
public function disableConfirmation($disable) {
$this->noConfirmation = ($disable ? 1 : 0);
@ -71,7 +71,7 @@ class ManiaCode {
* Show a message
*
* @param string $message Message text
* @return \FML\ManiaCode|static
* @return static
*/
public function addShowMessage($message) {
$messageElement = new ShowMessage($message);
@ -85,7 +85,7 @@ class ManiaCode {
* @param string $name Macroblock name
* @param string $file Macroblock file
* @param string $url Macroblock url
* @return \FML\ManiaCode|static
* @return static
*/
public function addInstallMacroblock($name, $file, $url) {
$macroblockElement = new InstallMacroblock($name, $file, $url);
@ -98,7 +98,7 @@ class ManiaCode {
*
* @param string $name Map name
* @param string $url Map url
* @return \FML\ManiaCode|static
* @return static
*/
public function addInstallMap($name, $url) {
$mapElement = new InstallMap($name, $url);
@ -111,7 +111,7 @@ class ManiaCode {
*
* @param string $name Map name
* @param string $url Map url
* @return \FML\ManiaCode|static
* @return static
*/
public function addPlayMap($name, $url) {
$mapElement = new PlayMap($name, $url);
@ -124,7 +124,7 @@ class ManiaCode {
*
* @param string $name Replay name
* @param string $url Replay url
* @return \FML\ManiaCode|static
* @return static
*/
public function addInstallReplay($name, $url) {
$replayElement = new InstallReplay($name, $url);
@ -137,7 +137,7 @@ class ManiaCode {
*
* @param string $name Replay name
* @param string $url Replay url
* @return \FML\ManiaCode|static
* @return static
*/
public function addViewReplay($name, $url) {
$replayElement = new ViewReplay($name, $url);
@ -150,7 +150,7 @@ class ManiaCode {
*
* @param string $name Replay name
* @param string $url Replay url
* @return \FML\ManiaCode|static
* @return static
*/
public function addPlayReplay($name, $url) {
$replayElement = new PlayReplay($name, $url);
@ -164,7 +164,7 @@ class ManiaCode {
* @param string $name Skin name
* @param string $file Skin file
* @param string $url Skin url
* @return \FML\ManiaCode|static
* @return static
*/
public function addInstallSkin($name, $file, $url) {
$skinElement = new InstallSkin($name, $file, $url);
@ -178,7 +178,7 @@ class ManiaCode {
* @param string $name Skin name
* @param string $file Skin file
* @param string $url Skin url
* @return \FML\ManiaCode|static
* @return static
*/
public function addGetSkin($name, $file, $url) {
$skinElement = new GetSkin($name, $file, $url);
@ -190,7 +190,7 @@ class ManiaCode {
* Add a buddy
*
* @param string $login Buddy login
* @return \FML\ManiaCode|static
* @return static
*/
public function addAddBuddy($login) {
$buddyElement = new AddBuddy($login);
@ -202,7 +202,7 @@ class ManiaCode {
* Go to a link
*
* @param string $link Goto link
* @return \FML\ManiaCode|static
* @return static
*/
public function addGoto($link) {
$gotoElement = new Go_To($link);
@ -214,7 +214,7 @@ class ManiaCode {
* Join a server
*
* @param string $login Server login
* @return \FML\ManiaCode|static
* @return static
*/
public function addJoinServer($login) {
$serverElement = new JoinServer($login);
@ -226,7 +226,7 @@ class ManiaCode {
* Add a server as favorite
*
* @param string $login Server login
* @return \FML\ManiaCode|static
* @return static
*/
public function addAddFavorite($login) {
$favoriteElement = new AddFavorite($login);
@ -240,7 +240,7 @@ class ManiaCode {
* @param string $name Script name
* @param string $file Script file
* @param string $url Script url
* @return \FML\ManiaCode|static
* @return static
*/
public function addInstallScript($name, $file, $url) {
$scriptElement = new InstallScript($name, $file, $url);
@ -254,7 +254,7 @@ class ManiaCode {
* @param string $name Pack name
* @param string $file Pack file
* @param string $url Pack url
* @return \FML\ManiaCode|static
* @return static
*/
public function addInstallPack($name, $file, $url) {
$packElement = new InstallPack($name, $file, $url);
@ -266,7 +266,7 @@ class ManiaCode {
* Add a ManiaCode element
*
* @param Element $element Element to add
* @return \FML\ManiaCode|static
* @return static
*/
public function addElement(Element $element) {
array_push($this->elements, $element);
@ -276,7 +276,7 @@ class ManiaCode {
/**
* Remove all elements from the ManiaCode
*
* @return \FML\ManiaCode|static
* @return static
*/
public function removeElements() {
$this->elements = array();

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class AddBuddy implements Element {
class AddBuddy extends Element {
/*
* Protected properties
*/
@ -20,7 +20,7 @@ class AddBuddy implements Element {
* Create a new AddBuddy Element
*
* @param string $login (optional) Buddy login
* @return \FML\ManiaCode\AddBuddy|static
* @return static
*/
public static function create($login = null) {
return new static($login);
@ -41,7 +41,7 @@ class AddBuddy implements Element {
* Set the buddy login
*
* @param string $login Buddy login
* @return \FML\ManiaCode\AddBuddy|static
* @return static
*/
public function setLogin($login) {
$this->login = (string)$login;
@ -52,7 +52,7 @@ class AddBuddy implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$loginElement = $domDocument->createElement('login', $this->login);
$xmlElement->appendChild($loginElement);
return $xmlElement;

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class AddFavorite implements Element {
class AddFavorite extends Element {
/*
* Protected properties
*/
@ -22,7 +22,7 @@ class AddFavorite implements Element {
* Create a new AddFavorite object
*
* @param string $login (optional) Server login
* @return \FML\ManiaCode\AddFavorite|static
* @return static
*/
public static function create($login = null) {
return new static($login);
@ -43,7 +43,7 @@ class AddFavorite implements Element {
* Set the server login
*
* @param string $login Server login
* @return \FML\ManiaCode\AddFavorite|static
* @return static
*/
public function setLogin($login) {
$this->login = (string)$login;
@ -57,7 +57,7 @@ class AddFavorite implements Element {
*
* @param string $serverIp Server ip
* @param int $serverPort Server port
* @return \FML\ManiaCode\AddFavorite|static
* @return static
*/
public function setIp($serverIp, $serverPort) {
$this->serverIp = (string)$serverIp;
@ -70,7 +70,7 @@ class AddFavorite implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
if (is_null($this->serverIp)) {
$loginElement = $domDocument->createElement('login', $this->login);
$xmlElement->appendChild($loginElement);

View File

@ -9,7 +9,11 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
interface Element {
abstract class Element {
/*
* Protected properties
*/
protected $tagName = 'element';
/**
* Render the ManiaCode Element
@ -17,5 +21,8 @@ interface Element {
* @param \DOMDocument $domDocument The DOMDocument for which the Element should be rendered
* @return \DOMElement
*/
public function render(\DOMDocument $domDocument);
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
return $xmlElement;
}
}

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class GetSkin implements Element {
class GetSkin extends Element {
/*
* Protected properties
*/
@ -24,7 +24,7 @@ class GetSkin implements Element {
* @param string $name (optional) Skin name
* @param string $file (optional) Skin file
* @param string $url (optional) Skin url
* @return \FML\ManiaCode\GetSkin|static
* @return static
*/
public static function create($name = null, $file = null, $url = null) {
return new static($name, $file, $url);
@ -53,7 +53,7 @@ class GetSkin implements Element {
* Set the name of the skin
*
* @param string $name Skin name
* @return \FML\ManiaCode\GetSkin|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -64,7 +64,7 @@ class GetSkin implements Element {
* Set the file of the skin
*
* @param string $file Skin file
* @return \FML\ManiaCode\GetSkin|static
* @return static
*/
public function setFile($file) {
$this->file = (string)$file;
@ -75,7 +75,7 @@ class GetSkin implements Element {
* Set the url of the skin
*
* @param string $url Skin url
* @return \FML\ManiaCode\GetSkin|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -86,7 +86,7 @@ class GetSkin implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$fileElement = $domDocument->createElement('file', $this->file);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Go_To implements Element {
class Go_To extends Element {
/*
* Protected properties
*/
@ -20,7 +20,7 @@ class Go_To implements Element {
* Create a new Go_To object
*
* @param string $link (optional) Goto link
* @return \FML\ManiaCode\Go_To|static
* @return static
*/
public static function create($link = null) {
return new static($link);
@ -41,7 +41,7 @@ class Go_To implements Element {
* Set link
*
* @param string $link Goto link
* @return \FML\ManiaCode\Go_To|static
* @return static
*/
public function setLink($link) {
$this->link = (string)$link;
@ -52,7 +52,7 @@ class Go_To implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$linkElement = $domDocument->createElement('link', $this->link);
$xmlElement->appendChild($linkElement);
return $xmlElement;

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class InstallMacroblock implements Element {
class InstallMacroblock extends Element {
/*
* Protected properties
*/
@ -23,7 +23,7 @@ class InstallMacroblock implements Element {
*
* @param string $name (optional) Macroblock name
* @param string $url (optional) Macroblock url
* @return \FML\ManiaCode\InstallMacroblock|static
* @return static
*/
public static function create($name = null, $url = null) {
return new static($name, $url);
@ -52,7 +52,7 @@ class InstallMacroblock implements Element {
* Set the name of the macroblock
*
* @param string $name Macroblock name
* @return \FML\ManiaCode\InstallMacroblock|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -63,7 +63,7 @@ class InstallMacroblock implements Element {
* Set the file of the macroblock
*
* @param string $file Macroblock file
* @return \FML\ManiaCode\InstallMacroblock|static
* @return static
*/
public function setFile($file) {
$this->file = (string)$file;
@ -74,7 +74,7 @@ class InstallMacroblock implements Element {
* Set the url of the macroblock
*
* @param string $url Macroblock url
* @return \FML\ManiaCode\InstallMacroblock|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -85,7 +85,7 @@ class InstallMacroblock implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$fileElement = $domDocument->createElement('file', $this->file);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class InstallMap implements Element {
class InstallMap extends Element {
/*
* Protected properties
*/
@ -22,7 +22,7 @@ class InstallMap implements Element {
*
* @param string $name (optional) Map name
* @param string $url (optional) Map url
* @return \FML\ManiaCode\InstallMap|static
* @return static
*/
public static function create($name = null, $url = null) {
return new static($name, $url);
@ -47,7 +47,7 @@ class InstallMap implements Element {
* Set the name of the map
*
* @param string $name Map name
* @return \FML\ManiaCode\InstallMap|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -58,7 +58,7 @@ class InstallMap implements Element {
* Set the url of the map
*
* @param string $url Map url
* @return \FML\ManiaCode\InstallMap|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -69,7 +69,7 @@ class InstallMap implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$urlElement = $domDocument->createElement('url', $this->url);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class InstallPack implements Element {
class InstallPack extends Element {
/*
* Protected properties
*/
@ -24,7 +24,7 @@ class InstallPack implements Element {
* @param string $name (optional) Pack name
* @param string $file (optional) Pack file
* @param string $url (optional) Pack url
* @return \FML\ManiaCode\InstallPack|static
* @return static
*/
public static function create($name = null, $file = null, $url = null) {
return new static($name, $file, $url);
@ -53,7 +53,7 @@ class InstallPack implements Element {
* Set the name of the pack
*
* @param string $name Pack name
* @return \FML\ManiaCode\InstallPack|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -64,7 +64,7 @@ class InstallPack implements Element {
* Set the file of the pack
*
* @param string $file Pack file
* @return \FML\ManiaCode\InstallPack|static
* @return static
*/
public function setFile($file) {
$this->file = (string)$file;
@ -75,7 +75,7 @@ class InstallPack implements Element {
* Set the url of the pack
*
* @param string $url Pack url
* @return \FML\ManiaCode\InstallPack|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -86,7 +86,7 @@ class InstallPack implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$fileElement = $domDocument->createElement('file', $this->file);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class InstallReplay implements Element {
class InstallReplay extends Element {
/*
* Protected properties
*/
@ -22,7 +22,7 @@ class InstallReplay implements Element {
*
* @param string $name (optional) Replay name
* @param string $url (optional) Replay url
* @return \FML\ManiaCode\InstallReplay|static
* @return static
*/
public static function create($name = null, $url = null) {
return new static($name, $url);
@ -47,7 +47,7 @@ class InstallReplay implements Element {
* Set the name of the replay
*
* @param string $name Replay name
* @return \FML\ManiaCode\InstallReplay|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -58,7 +58,7 @@ class InstallReplay implements Element {
* Set the url of the replay
*
* @param string $url Replay url
* @return \FML\ManiaCode\InstallReplay|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -69,7 +69,7 @@ class InstallReplay implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$urlElement = $domDocument->createElement('url', $this->url);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class InstallScript implements Element {
class InstallScript extends Element {
/*
* Protected properties
*/
@ -24,7 +24,7 @@ class InstallScript implements Element {
* @param string $name (optional) Script name
* @param string $file (optional) Script file
* @param string $url (optional) Script url
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public static function create($name = null, $file = null, $url = null) {
return new static($name, $file, $url);
@ -53,7 +53,7 @@ class InstallScript implements Element {
* Set the name of the script
*
* @param string $name Script name
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -64,7 +64,7 @@ class InstallScript implements Element {
* Set the file of the script
*
* @param string $file Script file
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public function setFile($file) {
$this->file = (string)$file;
@ -75,7 +75,7 @@ class InstallScript implements Element {
* Set the url of the script
*
* @param string $url Script url
* @return \FML\ManiaCode\InstallScript|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -86,7 +86,7 @@ class InstallScript implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$fileElement = $domDocument->createElement('file', $this->file);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class InstallSkin implements Element {
class InstallSkin extends Element {
/*
* Protected properties
*/
@ -24,7 +24,7 @@ class InstallSkin implements Element {
* @param string $name (optional) Skin name
* @param string $file (optional) Skin file
* @param string $url (optional) Skin url
* @return \FML\ManiaCode\InstallSkin|static
* @return static
*/
public static function create($name = null, $file = null, $url = null) {
return new static($name, $file, $url);
@ -53,7 +53,7 @@ class InstallSkin implements Element {
* Set the name of the skin
*
* @param string $name Skin name
* @return \FML\ManiaCode\InstallSkin|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -64,7 +64,7 @@ class InstallSkin implements Element {
* Set the file of the skin
*
* @param string $file Skin file
* @return \FML\ManiaCode\InstallSkin|static
* @return static
*/
public function setFile($file) {
$this->file = (string)$file;
@ -75,7 +75,7 @@ class InstallSkin implements Element {
* Set the url of the skin
*
* @param string $url Skin url
* @return \FML\ManiaCode\InstallSkin|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -86,7 +86,7 @@ class InstallSkin implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$fileElement = $domDocument->createElement('file', $this->file);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class JoinServer implements Element {
class JoinServer extends Element {
/*
* Protected properties
*/
@ -22,7 +22,7 @@ class JoinServer implements Element {
* Create a new JoinServer object
*
* @param string $login (optional) Server login
* @return \FML\ManiaCode\JoinServer|static
* @return static
*/
public static function create($login = null) {
return new static($login);
@ -43,7 +43,7 @@ class JoinServer implements Element {
* Set the server login
*
* @param string $login Server login
* @return \FML\ManiaCode\JoinServer|static
* @return static
*/
public function setLogin($login) {
$this->login = (string)$login;
@ -57,7 +57,7 @@ class JoinServer implements Element {
*
* @param string $serverIp Server ip
* @param int $serverPort Server port
* @return \FML\ManiaCode\JoinServer|static
* @return static
*/
public function setIp($serverIp, $serverPort) {
$this->serverIp = (string)$serverIp;
@ -70,7 +70,7 @@ class JoinServer implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
if (is_null($this->serverIp)) {
$loginElement = $domDocument->createElement('login', $this->login);
$xmlElement->appendChild($loginElement);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class PlayMap implements Element {
class PlayMap extends Element {
/*
* Protected properties
*/
@ -22,7 +22,7 @@ class PlayMap implements Element {
*
* @param string $name (optional) Map name
* @param string $url (optional) Map url
* @return \FML\ManiaCode\PlayMap|static
* @return static
*/
public static function create($name = null, $url = null) {
return new static($name, $url);
@ -47,7 +47,7 @@ class PlayMap implements Element {
* Set the name of the map
*
* @param string $name Map name
* @return \FML\ManiaCode\PlayMap|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -58,7 +58,7 @@ class PlayMap implements Element {
* Set the url of the map
*
* @param string $url Map url
* @return \FML\ManiaCode\PlayMap|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -69,7 +69,7 @@ class PlayMap implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$urlElement = $domDocument->createElement('url', $this->url);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class PlayReplay implements Element {
class PlayReplay extends Element {
/*
* Protected properties
*/
@ -22,7 +22,7 @@ class PlayReplay implements Element {
*
* @param string $name (optional) Replay name
* @param string $url (optional) Replay url
* @return \FML\ManiaCode\PlayReplay|static
* @return static
*/
public static function create($name = null, $url = null) {
return new static($name, $url);
@ -47,7 +47,7 @@ class PlayReplay implements Element {
* Set the name of the replay
*
* @param string $name Replay name
* @return \FML\ManiaCode\PlayReplay|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -58,7 +58,7 @@ class PlayReplay implements Element {
* Set the url of the replay
*
* @param string $url Replay url
* @return \FML\ManiaCode\PlayReplay|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -69,7 +69,7 @@ class PlayReplay implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$urlElement = $domDocument->createElement('url', $this->url);

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class ShowMessage implements Element {
class ShowMessage extends Element {
/*
* Protected properties
*/
@ -20,7 +20,7 @@ class ShowMessage implements Element {
* Create a new ShowMessage object
*
* @param string $message (optional) Message text
* @return \FML\ManiaCode\ShowMessage|static
* @return static
*/
public static function create($message = null) {
return new static($message);
@ -41,7 +41,7 @@ class ShowMessage implements Element {
* Set the message text
*
* @param string $message Message text
* @return \FML\ManiaCode\ShowMessage|static
* @return static
*/
public function setMessage($message) {
$this->message = (string)$message;
@ -52,7 +52,7 @@ class ShowMessage implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$messageElement = $domDocument->createElement('message', $this->message);
$xmlElement->appendChild($messageElement);
return $xmlElement;

View File

@ -9,7 +9,7 @@ namespace FML\ManiaCode;
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class ViewReplay implements Element {
class ViewReplay extends Element {
/*
* Protected properties
*/
@ -22,7 +22,7 @@ class ViewReplay implements Element {
*
* @param string $name (optional) Replay name
* @param string $url (optional) Replay url
* @return \FML\ManiaCode\ViewReplay|static
* @return static
*/
public static function create($name = null, $url = null) {
return new static($name, $url);
@ -47,7 +47,7 @@ class ViewReplay implements Element {
* Set the name of the replay
*
* @param string $name Replay name
* @return \FML\ManiaCode\ViewReplay|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -58,7 +58,7 @@ class ViewReplay implements Element {
* Set the url of the replay
*
* @param string $url Replay url
* @return \FML\ManiaCode\ViewReplay|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;
@ -69,7 +69,7 @@ class ViewReplay implements Element {
* @see \FML\ManiaCode\Element::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = $domDocument->createElement($this->tagName);
$xmlElement = parent::render($domDocument);
$nameElement = $domDocument->createElement('name', $this->name);
$xmlElement->appendChild($nameElement);
$urlElement = $domDocument->createElement('url', $this->url);

View File

@ -34,6 +34,7 @@ class ManiaLink {
protected $version = 1;
protected $background = null;
protected $navigable3d = 1;
protected $name = null;
protected $timeout = 0;
/** @var Renderable[] $children */
protected $children = array();
@ -48,7 +49,7 @@ class ManiaLink {
* Create a new ManiaLink object
*
* @param string $maniaLinkId (optional) ManiaLink id
* @return \FML\ManiaLink|static
* @return static
*/
public static function create($maniaLinkId = null) {
return new static($maniaLinkId);
@ -69,7 +70,7 @@ class ManiaLink {
* Set XML encoding
*
* @param string $encoding XML encoding
* @return \FML\ManiaLink|static
* @return static
*/
public function setXmlEncoding($encoding) {
$this->encoding = (string)$encoding;
@ -80,7 +81,7 @@ class ManiaLink {
* Set ManiaLink id
*
* @param string $maniaLinkId ManiaLink id
* @return \FML\ManiaLink|static
* @return static
*/
public function setId($maniaLinkId) {
$this->maniaLinkId = (string)$maniaLinkId;
@ -100,7 +101,7 @@ class ManiaLink {
* Set background
*
* @param string $background Background value
* @return \FML\ManiaLink|static
* @return static
*/
public function setBackground($background) {
$this->background = (string)$background;
@ -111,18 +112,29 @@ class ManiaLink {
* Set navigable3d
*
* @param bool $navigable3d Whether the manialink should be 3d navigable
* @return \FML\ManiaLink|static
* @return static
*/
public function setNavigable3d($navigable3d) {
$this->navigable3d = ($navigable3d ? 1 : 0);
return $this;
}
/**
* Set the ManiaLink Name
*
* @param string $name
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
return $this;
}
/**
* Set timeout
*
* @param int $timeout Timeout duration
* @return \FML\ManiaLink|static
* @return static
*/
public function setTimeout($timeout) {
$this->timeout = (int)$timeout;
@ -133,7 +145,7 @@ class ManiaLink {
* Add an element to the ManiaLink
*
* @param Renderable $child Child element to add
* @return \FML\ManiaLink|static
* @return static
*/
public function add(Renderable $child) {
if (!in_array($child, $this->children, true)) {
@ -145,7 +157,7 @@ class ManiaLink {
/**
* Remove all elements from the ManiaLink
*
* @return \FML\ManiaLink|static
* @return static
*/
public function removeChildren() {
$this->children = array();
@ -156,7 +168,7 @@ class ManiaLink {
* Set the Dictionary of the ManiaLink
*
* @param Dico $dico Dictionary for the ManiaLink
* @return \FML\ManiaLink
* @return static
*/
public function setDico(Dico $dico) {
$this->dico = $dico;
@ -180,7 +192,7 @@ class ManiaLink {
* Set the Stylesheet of the ManiaLink
*
* @param Stylesheet $stylesheet Stylesheet for the ManiaLink
* @return \FML\ManiaLink|static
* @return static
*/
public function setStylesheet(Stylesheet $stylesheet) {
$this->stylesheet = $stylesheet;
@ -204,7 +216,7 @@ class ManiaLink {
* Set the Script of the ManiaLink
*
* @param Script $script Script for the ManiaLink
* @return \FML\ManiaLink|static
* @return static
*/
public function setScript(Script $script) {
$this->script = $script;
@ -253,6 +265,9 @@ class ManiaLink {
if (!$this->navigable3d) {
$maniaLink->setAttribute('navigable3d', $this->navigable3d);
}
if ($this->name) {
$maniaLink->setAttribute('name', $this->name);
}
if ($this->timeout) {
$timeoutXml = $domDocument->createElement('timeout', $this->timeout);
$maniaLink->appendChild($timeoutXml);

View File

@ -23,7 +23,7 @@ class ManiaLinks {
/**
* Create a new ManiaLinks object
*
* @return \FML\ManiaLinks|static
* @return static
*/
public static function create() {
return new static();
@ -33,7 +33,7 @@ class ManiaLinks {
* Set XML encoding
*
* @param string $encoding XML encoding
* @return \FML\ManiaLinks|static
* @return static
*/
public function setXmlEncoding($encoding) {
$this->encoding = (string)$encoding;
@ -44,7 +44,7 @@ class ManiaLinks {
* Add a child ManiaLink
*
* @param ManiaLink $child Child ManiaLink
* @return \FML\ManiaLinks
* @return static
*/
public function add(ManiaLink $child) {
if (!in_array($child, $this->children, true)) {
@ -56,7 +56,7 @@ class ManiaLinks {
/**
* Remove all child ManiaLinks
*
* @return \FML\ManiaLinks|static
* @return static
*/
public function removeChildren() {
$this->children = array();
@ -67,7 +67,7 @@ class ManiaLinks {
* Set the CustomUI
*
* @param CustomUI $customUI CustomUI object
* @return \FML\ManiaLinks|static
* @return static
*/
public function setCustomUI(CustomUI $customUI) {
$this->customUI = $customUI;

View File

@ -26,7 +26,7 @@ class CheckBoxDesign implements Styleable, SubStyleable {
/**
* Create the default enabled Design
*
* @return \FML\Models\CheckBoxDesign|static
* @return static
*/
public static function defaultEnabledDesign() {
return new static(Quad_Icons64x64_1::STYLE, Quad_Icons64x64_1::SUBSTYLE_Check);
@ -35,7 +35,7 @@ class CheckBoxDesign implements Styleable, SubStyleable {
/**
* Create the default disabled Design
*
* @return \FML\Models\CheckBoxDesign|static
* @return static
*/
public static function defaultDisabledDesign() {
return new static(Quad_Icons64x64_1::STYLE, Quad_Icons64x64_1::SUBSTYLE_Check);
@ -60,7 +60,7 @@ class CheckBoxDesign implements Styleable, SubStyleable {
* Set the image url
*
* @param string $url Image url
* @return \FML\Models\CheckBoxDesign|static
* @return static
*/
public function setImageUrl($url) {
$this->url = (string)$url;
@ -100,7 +100,7 @@ class CheckBoxDesign implements Styleable, SubStyleable {
* Apply the Design to the given Quad
*
* @param Quad $quad CheckBox Quad
* @return \FML\Models\CheckBoxDesign|static
* @return static
*/
public function applyToQuad(Quad $quad) {
$quad->setImage($this->url);

View File

@ -47,7 +47,7 @@ class ActionTrigger extends ScriptFeature {
* Set the action to trigger
*
* @param string $actionName
* @return \FML\Script\Features\ActionTrigger|static
* @return static
*/
public function setActionName($actionName) {
$this->actionName = (string)$actionName;
@ -58,7 +58,7 @@ class ActionTrigger extends ScriptFeature {
* Set the Control
*
* @param Control $control Action Control
* @return \FML\Script\Features\ActionTrigger|static
* @return static
*/
public function setControl(Control $control) {
$control->checkId();
@ -73,7 +73,7 @@ class ActionTrigger extends ScriptFeature {
* Set the label name
*
* @param string $labelName Script Label name
* @return \FML\Script\Features\ActionTrigger|static
* @return static
*/
public function setLabelName($labelName) {
$this->labelName = (string)$labelName;

View File

@ -64,7 +64,7 @@ class CheckBoxFeature extends ScriptFeature {
* Set the CheckBox Quad
*
* @param Quad $quad CheckBox Quad
* @return \FML\Script\Features\CheckBoxFeature|static
* @return static
*/
public function setQuad(Quad $quad) {
$this->quad = $quad->checkId()->setScriptEvents(true);
@ -84,7 +84,7 @@ class CheckBoxFeature extends ScriptFeature {
* Set the CheckBox Entry
*
* @param Entry $entry CheckBox Entry
* @return \FML\Script\Features\CheckBoxFeature|static
* @return static
*/
public function setEntry(Entry $entry) {
$this->entry = $entry->checkId();
@ -104,7 +104,7 @@ class CheckBoxFeature extends ScriptFeature {
* Set the default value
*
* @param bool $default Default value
* @return \FML\Script\Features\CheckBoxFeature|static
* @return static
*/
public function setDefault($default) {
$this->default = (bool)$default;
@ -115,7 +115,7 @@ class CheckBoxFeature extends ScriptFeature {
* Set the enabled Design
*
* @param CheckBoxDesign $checkBoxDesign Enabled CheckBox Design
* @return \FML\Script\Features\CheckBoxFeature|static
* @return static
*/
public function setEnabledDesign(CheckBoxDesign $checkBoxDesign) {
$this->enabledDesign = $checkBoxDesign;
@ -126,7 +126,7 @@ class CheckBoxFeature extends ScriptFeature {
* Set the disabled Design
*
* @param CheckBoxDesign $checkBoxDesign Disabled CheckBox Design
* @return \FML\Script\Features\CheckBoxFeature|static
* @return static
*/
public function setDisabledDesign(CheckBoxDesign $checkBoxDesign) {
$this->disabledDesign = $checkBoxDesign;

View File

@ -42,7 +42,7 @@ class Clock extends ScriptFeature {
* Set the Label
*
* @param Label $label Clock Label
* @return \FML\Script\Features\Clock|static
* @return static
*/
public function setLabel(Label $label) {
$this->label = $label->checkId();
@ -53,7 +53,7 @@ class Clock extends ScriptFeature {
* Set whether seconds should be shown
*
* @param bool $showSeconds Whether seconds should be shown
* @return \FML\Script\Features\Clock|static
* @return static
*/
public function setShowSeconds($showSeconds) {
$this->showSeconds = (bool)$showSeconds;
@ -64,7 +64,7 @@ class Clock extends ScriptFeature {
* Set whether the full date should be shown
*
* @param bool $showFullDate Whether the full date should be shown
* @return \FML\Script\Features\Clock|static
* @return static
*/
public function setShowFullDate($showFullDate) {
$this->showFullDate = (bool)$showFullDate;

View File

@ -40,7 +40,7 @@ class ControlScript extends ScriptFeature {
* Set the Control
*
* @param Control $control Event Control
* @return \FML\Script\Features\ControlScript|static
* @return static
*/
public function setControl(Control $control) {
$this->control = $control->checkId();
@ -52,7 +52,7 @@ class ControlScript extends ScriptFeature {
* Set the script text
*
* @param string $text Script text
* @return \FML\Script\Features\ControlScript|static
* @return static
*/
public function setText($text) {
$this->text = (string)$text;
@ -63,7 +63,7 @@ class ControlScript extends ScriptFeature {
* Set the label name
*
* @param string $labelName Script Label name
* @return \FML\Script\Features\ControlScript|static
* @return static
*/
public function setLabelName($labelName) {
$this->labelName = (string)$labelName;

View File

@ -40,7 +40,7 @@ class EntrySubmit extends ScriptFeature {
* Set the Entry
*
* @param Entry $entry Entry Control
* @return \FML\Script\Features\EntrySubmit|static
* @return static
*/
public function setEntry(Entry $entry) {
$this->entry = $entry->checkId()->setScriptEvents(true);
@ -51,7 +51,7 @@ class EntrySubmit extends ScriptFeature {
* Set the submit url
*
* @param string $url Submit url
* @return \FML\Script\Features\EntrySubmit|static
* @return static
*/
public function setUrl($url) {
$this->url = (string)$url;

View File

@ -42,7 +42,7 @@ class KeyAction extends ScriptFeature {
* Set the action to trigger
*
* @param string $actionName Triggered action
* @return \FML\Script\Features\KeyAction|static
* @return static
*/
public function setActionName($actionName) {
$this->actionName = (string)$actionName;
@ -53,7 +53,7 @@ class KeyAction extends ScriptFeature {
* Set the key name for triggering the action
*
* @param string $keyName Key Name
* @return \FML\Script\Features\KeyAction|static
* @return static
*/
public function setKeyName($keyName) {
$this->keyName = (string)$keyName;
@ -66,7 +66,7 @@ class KeyAction extends ScriptFeature {
* Set the key code for triggering the action
*
* @param int $keyCode Key Code
* @return \FML\Script\Features\KeyAction|static
* @return static
*/
public function setKeyCode($keyCode) {
$this->keyCode = (int)$keyCode;
@ -79,7 +79,7 @@ class KeyAction extends ScriptFeature {
* Set the char to press for triggering the action
*
* @param string $charPressed Pressed char
* @return \FML\Script\Features\KeyAction|static
* @return static
*/
public function setCharPressed($charPressed) {
$this->charPressed = (string)$charPressed;

View File

@ -38,7 +38,7 @@ class MapInfo extends ScriptFeature {
* Set the Control
*
* @param Control $control Map Info Control
* @return \FML\Script\Features\MapInfo|static
* @return static
*/
public function setControl(Control $control) {
$control->checkId();
@ -53,7 +53,7 @@ class MapInfo extends ScriptFeature {
* Set the label name
*
* @param string $labelName Script Label name
* @return \FML\Script\Features\MapInfo|static
* @return static
*/
public function setLabelName($labelName) {
$this->labelName = (string)$labelName;

View File

@ -46,7 +46,7 @@ class Menu extends ScriptFeature {
* @param Control $item Item Control in the Menu bar
* @param Control $control Toggled Menu Control
* @param bool $isStartElement (optional) Whether the Menu should start with this Element
* @return \FML\Script\Features\Menu|static
* @return static
*/
public function addElement(Control $item, Control $control, $isStartElement = false) {
$menuElement = new MenuElement($item, $control);
@ -59,7 +59,7 @@ class Menu extends ScriptFeature {
*
* @param MenuElement $menuElement Menu Element
* @param bool $isStartElement (optional) Whether the Menu should start with this Element
* @return \FML\Script\Features\Menu|static
* @return static
*/
public function appendElement(MenuElement $menuElement, $isStartElement = false) {
if (!in_array($menuElement, $this->elements, true)) {
@ -77,7 +77,7 @@ class Menu extends ScriptFeature {
* Set the Element to start with
*
* @param MenuElement $startElement Starting Element
* @return \FML\Script\Features\Menu|static
* @return static
*/
public function setStartElement(MenuElement $startElement) {
$this->startElement = $startElement;

View File

@ -38,7 +38,7 @@ class MenuElement {
* Set the Item Control
*
* @param Control $item Item Control in the Menu bar
* @return \FML\Script\Features\MenuElement|static
* @return static
*/
public function setItem(Control $item) {
$item->checkId();
@ -62,7 +62,7 @@ class MenuElement {
* Set the Menu Control
*
* @param Control $control Toggled Menu Control
* @return \FML\Script\Features\MenuElement|static
* @return static
*/
public function setControl(Control $control) {
$this->control = $control->checkId();

View File

@ -54,7 +54,7 @@ class Paging extends ScriptFeature {
*
* @param Control $pageControl Page Control
* @param string $pageNumber (optional) Page number
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function addPage(Control $pageControl, $pageNumber = null) {
if (is_null($pageNumber)) {
@ -69,7 +69,7 @@ class Paging extends ScriptFeature {
* Append a Page
*
* @param PagingPage $page Paging Page
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function appendPage(PagingPage $page) {
if (!in_array($page, $this->pages, true)) {
@ -83,7 +83,7 @@ class Paging extends ScriptFeature {
*
* @param Control $buttonControl Button used for browsing
* @param int $browseAction (optional) Number of browsed Pages per click
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function addButton(Control $buttonControl, $browseAction = null) {
if (is_null($browseAction)) {
@ -103,7 +103,7 @@ class Paging extends ScriptFeature {
* Append a Button to browse through Pages
*
* @param PagingButton $button Paging Button
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function appendButton(PagingButton $button) {
if (!in_array($button, $this->buttons, true)) {
@ -116,7 +116,7 @@ class Paging extends ScriptFeature {
* Set the Label showing the Page number
*
* @param Label $label Page number Label
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function setLabel(Label $label) {
$this->label = $label->checkId();
@ -127,7 +127,7 @@ class Paging extends ScriptFeature {
* Set the Start Page number
*
* @param int $startPageNumber Page number to start with
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function setStartPageNumber($startPageNumber) {
$this->startPageNumber = (int)$startPageNumber;
@ -137,7 +137,7 @@ class Paging extends ScriptFeature {
* Set a custom maximum Page number for using chunks
*
* @param int $maxPageNumber Custom maximum Page number
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function setCustomMaxPageNumber($maxPageNumber) {
$this->customMaxPageNumber = (int)$maxPageNumber;
@ -148,7 +148,7 @@ class Paging extends ScriptFeature {
* Set the action triggered when the previous chunk is needed
*
* @param string $previousChunkAction Triggered action
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function setPreviousChunkAction($previousChunkAction) {
$this->previousChunkAction = (string)$previousChunkAction;
@ -159,7 +159,7 @@ class Paging extends ScriptFeature {
* Set the action triggered when the next chunk is needed
*
* @param string $nextChunkAction Triggered action
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function setNextChunkAction($nextChunkAction) {
$this->nextChunkAction = (string)$nextChunkAction;
@ -170,7 +170,7 @@ class Paging extends ScriptFeature {
* Set the actions triggered when another chunk is needed
*
* @param string $chunkAction Triggered action
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function setChunkActions($chunkAction) {
$this->setNextChunkAction($chunkAction);
@ -182,7 +182,7 @@ class Paging extends ScriptFeature {
* Set if the chunk action should get the needed Page number appended
*
* @param bool $appendPageNumber Whether to append the needed Page number
* @return \FML\Script\Features\Paging|static
* @return static
*/
public function setChunkActionAppendsPageNumber($appendPageNumber) {
$this->chunkActionAppendsPageNumber = (bool)$appendPageNumber;

View File

@ -39,7 +39,7 @@ class PagingButton {
* Set the Button Control
*
* @param Control $control Browse Control
* @return \FML\Script\Features\PagingButton|static
* @return static
*/
public function setControl(Control $control) {
$control->checkId();
@ -63,7 +63,7 @@ class PagingButton {
* Set the browse action
*
* @param int $browseAction Number of browsed Pages per click
* @return \FML\Script\Features\PagingButton|static
* @return static
*/
public function setBrowseAction($browseAction) {
$this->browseAction = (int)$browseAction;

View File

@ -36,7 +36,7 @@ class PagingPage {
* Set the Page Control
*
* @param Control $control Page Control
* @return \FML\Script\Features\PagingPage|static
* @return static
*/
public function setControl(Control $control) {
$this->control = $control->checkId();
@ -56,7 +56,7 @@ class PagingPage {
* Set the Page number
*
* @param int $pageNumber Number of the Page
* @return \FML\Script\Features\PagingPage|static
* @return static
*/
public function setPageNumber($pageNumber) {
$this->number = (int)$pageNumber;

View File

@ -43,7 +43,7 @@ class PlayerProfile extends ScriptFeature {
* Set the login of the opened player
*
* @param string $login Player login
* @return \FML\Script\Features\PlayerProfile|static
* @return static
*/
public function setLogin($login) {
$this->login = $login;
@ -54,7 +54,7 @@ class PlayerProfile extends ScriptFeature {
* Set the Control
*
* @param Control $control Profile Control
* @return \FML\Script\Features\PlayerProfile|static
* @return static
*/
public function setControl(Control $control) {
$control->checkId();
@ -69,7 +69,7 @@ class PlayerProfile extends ScriptFeature {
* Set the label name
*
* @param string $labelName Script Label name
* @return \FML\Script\Features\PlayerProfile|static
* @return static
*/
public function setLabelName($labelName) {
$this->labelName = (string)$labelName;

View File

@ -13,10 +13,10 @@ use FML\Types\ScriptFeatureable;
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
abstract class ScriptFeature {
/**
* Collect the Script Features of the given objects
*
* @param ScriptFeatureable $objects (optional) Various amount of ScriptFeatureable objects
* @return ScriptFeature[]
*/
public static function collect() {
@ -36,7 +36,7 @@ abstract class ScriptFeature {
* Prepare the given Script for rendering by adding the needed Labels, etc.
*
* @param Script $script Script to prepare
* @return \FML\Script\Features\ScriptFeature|static
* @return static
*/
public abstract function prepare(Script $script);
}

View File

@ -52,7 +52,7 @@ class Toggle extends ScriptFeature {
* Set the toggling Control
*
* @param Control $control Toggling Control
* @return \FML\Script\Features\Toggle|static
* @return static
*/
public function setTogglingControl(Control $control) {
$control->checkId();
@ -67,7 +67,7 @@ class Toggle extends ScriptFeature {
* Set the toggled Control
*
* @param Control $control Toggling Control
* @return \FML\Script\Features\Toggle|static
* @return static
*/
public function setToggledControl(Control $control) {
$this->toggledControl = $control->checkId();
@ -78,7 +78,7 @@ class Toggle extends ScriptFeature {
* Set the label name
*
* @param string $labelName Script Label Name
* @return \FML\Script\Features\Toggle|static
* @return static
*/
public function setLabelName($labelName) {
$this->labelName = (string)$labelName;
@ -89,7 +89,7 @@ class Toggle extends ScriptFeature {
* Set to only show
*
* @param bool $onlyShow Whether it should only show the Control but not toggle
* @return \FML\Script\Features\Toggle|static
* @return static
*/
public function setOnlyShow($onlyShow) {
$this->onlyShow = (bool)$onlyShow;
@ -100,7 +100,7 @@ class Toggle extends ScriptFeature {
* Set to only hide
*
* @param bool $onlyHide Whether it should only hide the Control but not toggle
* @return \FML\Script\Features\Toggle|static
* @return static
*/
public function setOnlyHide($onlyHide) {
$this->onlyHide = (bool)$onlyHide;

View File

@ -55,7 +55,7 @@ class Tooltip extends ScriptFeature {
* Set the Hover Control
*
* @param Control $hoverControl Hover Control
* @return \FML\Script\Features\Tooltip|static
* @return static
*/
public function setHoverControl(Control $hoverControl) {
$hoverControl->checkId();
@ -70,7 +70,7 @@ class Tooltip extends ScriptFeature {
* Set the Tooltip Control
*
* @param Control $tooltipControl Tooltip Control
* @return \FML\Script\Features\Tooltip|static
* @return static
*/
public function setTooltipControl(Control $tooltipControl) {
$this->tooltipControl = $tooltipControl->checkId()->setVisible(false);
@ -81,7 +81,7 @@ class Tooltip extends ScriptFeature {
* Set to only show
*
* @param bool $stayOnClick (optional) Whether the Tooltip should stay on click
* @return \FML\Script\Features\Tooltip|static
* @return static
*/
public function setStayOnClick($stayOnClick) {
$this->stayOnClick = (bool)$stayOnClick;
@ -92,7 +92,7 @@ class Tooltip extends ScriptFeature {
* Set to only hide
*
* @param bool $invert (optional) Whether the visibility toggling should be inverted
* @return \FML\Script\Features\Tooltip|static
* @return static
*/
public function setInvert($invert) {
$this->invert = (bool)$invert;
@ -103,7 +103,7 @@ class Tooltip extends ScriptFeature {
* Set text
*
* @param string $text (optional) Text to display if the TooltipControl is a Label
* @return \FML\Script\Features\Tooltip|static
* @return static
*/
public function setText($text) {
$this->text = (string)$text;

View File

@ -82,7 +82,7 @@ class UISound extends ScriptFeature {
* Set the sound to play
*
* @param string $soundName Sound name
* @return \FML\Script\Features\UISound|static
* @return static
*/
public function setSoundName($soundName) {
$this->soundName = (string)$soundName;
@ -93,7 +93,7 @@ class UISound extends ScriptFeature {
* Set the Control
*
* @param Control $control Action Control
* @return \FML\Script\Features\UISound|static
* @return static
*/
public function setControl(Control $control) {
$control->checkId();
@ -108,7 +108,7 @@ class UISound extends ScriptFeature {
* Set the sound variant
*
* @param int $variant Sound variant
* @return \FML\Script\Features\UISound|static
* @return static
*/
public function setVariant($variant) {
$this->variant = (int)$variant;
@ -119,7 +119,7 @@ class UISound extends ScriptFeature {
* Set the volume
*
* @param float $volume Sound volume
* @return \FML\Script\Features\UISound|static
* @return static
*/
public function setVolume($volume) {
$this->volume = (float)$volume;
@ -130,7 +130,7 @@ class UISound extends ScriptFeature {
* Set the label name
*
* @param string $labelName Script Label name
* @return \FML\Script\Features\UISound|static
* @return static
*/
public function setLabelName($labelName) {
$this->labelName = (string)$labelName;

View File

@ -62,7 +62,7 @@ class ValuePickerFeature extends ScriptFeature {
* Set the ValuePicker Label
*
* @param Label $label ValuePicker Label
* @return \FML\Script\Features\ValuePickerFeature|static
* @return static
*/
public function setLabel(Label $label) {
$this->label = $label->checkId()->setScriptEvents(true);
@ -82,7 +82,7 @@ class ValuePickerFeature extends ScriptFeature {
* Set the hidden Entry
*
* @param Entry $entry Hidden Entry
* @return \FML\Script\Features\ValuePickerFeature|static
* @return static
*/
public function setEntry(Entry $entry) {
$this->entry = $entry->checkId();
@ -102,7 +102,7 @@ class ValuePickerFeature extends ScriptFeature {
* Set the possible values
*
* @param array $values Possible values
* @return \FML\Script\Features\ValuePickerFeature|static
* @return static
*/
public function setValues(array $values) {
$this->values = array();
@ -116,7 +116,7 @@ class ValuePickerFeature extends ScriptFeature {
* Set the default value
*
* @param string $default Default value
* @return \FML\Script\Features\ValuePickerFeature|static
* @return static
*/
public function setDefault($default) {
$this->default = (string)$default;

View File

@ -36,7 +36,7 @@ class Script {
*
* @param string $file Include file
* @param string $namespace Include namespace
* @return \FML\Script\Script|static
* @return static
*/
public function setScriptInclude($file, $namespace = null) {
if (is_object($file) && ($file instanceof ScriptInclude)) {
@ -53,7 +53,7 @@ class Script {
*
* @param string $name Constant name
* @param string $value Constant value
* @return \FML\Script\Script|static
* @return static
*/
public function addScriptConstant($name, $value = null) {
if (is_object($name) && ($name instanceof ScriptConstant)) {
@ -72,7 +72,7 @@ class Script {
*
* @param string $name Function name
* @param string $text Function text
* @return \FML\Script\Script|static
* @return static
*/
public function addScriptFunction($name, $text = null) {
if (is_object($name) && ($name instanceof ScriptFunction)) {
@ -91,7 +91,7 @@ class Script {
*
* @param string $name Label name
* @param string $text Script text
* @return \FML\Script\Script|static
* @return static
*/
public function addCustomScriptLabel($name, $text = null) {
if (is_object($name) && ($name instanceof ScriptLabel)) {
@ -109,7 +109,7 @@ class Script {
* @param string $name Label name
* @param string $text Script text
* @param bool $isolated (optional) Whether to isolate the Label Script
* @return \FML\Script\Script|static
* @return static
*/
public function appendGenericScriptLabel($name, $text = null, $isolated = false) {
if (is_object($name) && ($name instanceof ScriptLabel)) {
@ -124,7 +124,7 @@ class Script {
/**
* Remove all generic Script texts
*
* @return \FML\Script\Script|static
* @return static
*/
public function resetGenericScriptLabels() {
$this->genericLabels = array();
@ -135,7 +135,7 @@ class Script {
* Add a Script Feature
*
* @param ScriptFeature $feature Script Feature
* @return \FML\Script\Script|static
* @return static
*/
public function addFeature(ScriptFeature $feature) {
if (!in_array($feature, $this->features, true)) {
@ -148,7 +148,7 @@ class Script {
* Load the given Script Feature
*
* @param ScriptFeature $scriptFeature Script Feature to load
* @return \FML\Script\Script|static
* @return static
*/
public function loadFeature(ScriptFeature $scriptFeature) {
$scriptFeature->prepare($this);
@ -159,7 +159,7 @@ class Script {
* Load the given Script Features
*
* @param ScriptFeature[] $scriptFeatures Script Features to load
* @return \FML\Script\Script|static
* @return static
*/
public function loadFeatures(array $scriptFeatures) {
foreach ($scriptFeatures as $scriptFeature) {

View File

@ -31,7 +31,7 @@ class ScriptConstant {
* Set the name
*
* @param string $name Constant name
* @return \FML\Script\ScriptConstant|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -42,7 +42,7 @@ class ScriptConstant {
* Set the value
*
* @param string $value Constant value
* @return \FML\Script\ScriptConstant|static
* @return static
*/
public function setValue($value) {
$this->value = $value;

View File

@ -31,7 +31,7 @@ class ScriptFunction {
* Set the name
*
* @param string $name Function name
* @return \FML\Script\ScriptFunction|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -42,7 +42,7 @@ class ScriptFunction {
* Set the text
*
* @param string $text Function text
* @return \FML\Script\ScriptFunction|static
* @return static
*/
public function setText($text) {
$this->text = (string)$text;

View File

@ -37,7 +37,7 @@ class ScriptInclude {
* Set the file
*
* @param string $file Include file
* @return \FML\Script\ScriptInclude|static
* @return static
*/
public function setFile($file) {
$this->file = (string)$file;
@ -48,7 +48,7 @@ class ScriptInclude {
* Set the namespace
*
* @param string $namespace Include namespace
* @return \FML\Script\ScriptInclude|static
* @return static
*/
public function setNamespace($namespace) {
$this->namespace = (string)$namespace;

View File

@ -46,7 +46,7 @@ class ScriptLabel {
* Set the name
*
* @param string $name Label name
* @return \FML\Script\ScriptLabel|static
* @return static
*/
public function setName($name) {
$this->name = (string)$name;
@ -57,7 +57,7 @@ class ScriptLabel {
* Set the text
*
* @param string $text Script text
* @return \FML\Script\ScriptLabel|static
* @return static
*/
public function setText($text) {
$this->text = (string)$text;
@ -68,7 +68,7 @@ class ScriptLabel {
* Set isolation
*
* @param bool $isolated Whether the code should be isolated in an own block
* @return \FML\Script\ScriptLabel|static
* @return static
*/
public function setIsolated($isolated) {
$this->isolated = (bool)$isolated;

View File

@ -35,7 +35,7 @@ class Mood {
/**
* Create a new Mood object
*
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public static function create() {
return new static();
@ -47,7 +47,7 @@ class Mood {
* @param float $red Red color value
* @param float $green Green color value
* @param float $blue Blue color value
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLightAmbientColor($red, $green, $blue) {
$this->lAmbient_LinearRgb = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
@ -60,7 +60,7 @@ class Mood {
* @param float $red Red color value
* @param float $green Green color value
* @param float $blue Blue color value
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setCloudsColorMin($red, $green, $blue) {
$this->cloudsRgbMinLinear = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
@ -73,7 +73,7 @@ class Mood {
* @param float $red Red color value
* @param float $green Green color value
* @param float $blue Blue color value
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setCloudsColorMax($red, $green, $blue) {
$this->cloudsRgbMaxLinear = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
@ -86,7 +86,7 @@ class Mood {
* @param float $red Red color value
* @param float $green Green color value
* @param float $blue Blue color value
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLight0Color($red, $green, $blue) {
$this->lDir0_LinearRgb = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
@ -97,7 +97,7 @@ class Mood {
* Set intensity of light source 0
*
* @param float $intensity Light intensity
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLight0Intensity($intensity) {
$this->lDir0_Intens = (float)$intensity;
@ -108,7 +108,7 @@ class Mood {
* Set phi angle of light source 0
*
* @param float $phiAngle Phi angle
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLight0PhiAngle($phiAngle) {
$this->lDir0_DirPhi = (float)$phiAngle;
@ -119,7 +119,7 @@ class Mood {
* Set theta angle of light source 0
*
* @param float $thetaAngle Theta angle
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLight0ThetaAngle($thetaAngle) {
$this->lDir0_DirTheta = (float)$thetaAngle;
@ -132,7 +132,7 @@ class Mood {
* @param float $red Red color value
* @param float $green Green color value
* @param float $blue Blue color value
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLightBallColor($red, $green, $blue) {
$this->lBall_LinearRgb = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
@ -143,7 +143,7 @@ class Mood {
* Set light ball intensity
*
* @param float $intensity Light ball intensity
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLightBallIntensity($intensity) {
$this->lBall_Intensity = (float)$intensity;
@ -154,7 +154,7 @@ class Mood {
* Set light ball radius
*
* @param float $radius Light ball radius
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setLightBallRadius($radius) {
$this->lBall_Radius = (float)$radius;
@ -167,7 +167,7 @@ class Mood {
* @param float $red Red color value
* @param float $green Green color value
* @param float $blue Blue color value
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setFogColor($red, $green, $blue) {
$this->fogColorSrgb = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
@ -180,7 +180,7 @@ class Mood {
* @param float $red Red color value
* @param float $green Green color value
* @param float $blue Blue color value
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setSelfIllumColor($red, $green, $blue) {
$this->selfIllumColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
@ -191,7 +191,7 @@ class Mood {
* Set sky gradient scale
*
* @param float $scale Gradient scale
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function setSkyGradientScale($scale) {
$this->skyGradientV_Scale = (float)$scale;
@ -203,7 +203,7 @@ class Mood {
*
* @param float $gradientX Scale value
* @param string $color Gradient color
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function addSkyGradientKey($gradientX, $color) {
$gradientX = (float)$gradientX;
@ -216,7 +216,7 @@ class Mood {
/**
* Remove all sky gradient keys
*
* @return \FML\Stylesheet\Mood|static
* @return static
*/
public function removeSkyGradientKeys() {
$this->skyGradientKeys = array();

View File

@ -41,7 +41,7 @@ class Style3d {
* Create a new Style3d object
*
* @param string $styleId (optional) Style id
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public static function create($styleId = null) {
return new static($styleId);
@ -62,7 +62,7 @@ class Style3d {
* Set style id
*
* @param string $styleId Style id
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setId($styleId) {
$this->styleId = (string)$styleId;
@ -72,7 +72,7 @@ class Style3d {
/**
* Check for id and assign one if necessary
*
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function checkId() {
if (!$this->styleId) {
@ -94,7 +94,7 @@ class Style3d {
* Set model
*
* @param string $model Style model
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setModel($model) {
$this->model = (string)$model;
@ -105,7 +105,7 @@ class Style3d {
* Set thickness
*
* @param float $thickness Style thickness
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setThickness($thickness) {
$this->thickness = (float)$thickness;
@ -116,7 +116,7 @@ class Style3d {
* Set color
*
* @param string $color Style color
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setColor($color) {
$this->color = (string)$color;
@ -127,7 +127,7 @@ class Style3d {
* Set focus color
*
* @param string $focusColor Style focus color
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setFocusColor($focusColor) {
$this->focusColor = (string)$focusColor;
@ -138,7 +138,7 @@ class Style3d {
* Set light color
*
* @param string $lightColor Light color
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setLightColor($lightColor) {
$this->lightColor = (string)$lightColor;
@ -149,7 +149,7 @@ class Style3d {
* Set focus light color
*
* @param string $focusLightColor Focus light color
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setFocusLightColor($focusLightColor) {
$this->focusLightColor = (string)$focusLightColor;
@ -160,7 +160,7 @@ class Style3d {
* Set Y-offset
*
* @param float $yOffset Y-offset
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setYOffset($yOffset) {
$this->yOffset = (float)$yOffset;
@ -171,7 +171,7 @@ class Style3d {
* Set focus Y-offset
*
* @param float $focusYOffset Focus Y-offset
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setFocusYOffset($focusYOffset) {
$this->focusYOffset = (float)$focusYOffset;
@ -182,7 +182,7 @@ class Style3d {
* Set Z-offset
*
* @param float $zOffset Z-offset
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setZOffset($zOffset) {
$this->zOffset = (float)$zOffset;
@ -193,7 +193,7 @@ class Style3d {
* Set focus Z-offset
*
* @param float $focusZOffset Focus Z-offset
* @return \FML\Stylesheet\Style3d|static
* @return static
*/
public function setFocusZOffset($focusZOffset) {
$this->focusZOffset = (float)$focusZOffset;

View File

@ -22,7 +22,7 @@ class Stylesheet {
/**
* Create a new Stylesheet object
*
* @return \FML\Stylesheet\Stylesheet|static
* @return static
*/
public static function create() {
return new static();
@ -32,7 +32,7 @@ class Stylesheet {
* Add a new Style3d
*
* @param Style3d $style3d Style3d object
* @return \FML\Stylesheet\Stylesheet|static
* @return static
*/
public function addStyle3d(Style3d $style3d) {
if (!in_array($style3d, $this->styles3d, true)) {
@ -44,7 +44,7 @@ class Stylesheet {
/**
* Remove all Style3ds
*
* @return \FML\Stylesheet\Stylesheet|static
* @return static
*/
public function removeStyles() {
$this->styles3d = array();
@ -55,7 +55,7 @@ class Stylesheet {
* Set the Mood object of the Stylesheet
*
* @param Mood $mood Mood object
* @return \FML\Stylesheet\Stylesheet|static
* @return static
*/
public function setMood(Mood $mood) {
$this->mood = $mood;

View File

@ -36,7 +36,7 @@ interface Actionable {
* Set action
*
* @param string $action Action name
* @return \FML\Types\Actionable|static
* @return static
*/
public function setAction($action);
@ -51,7 +51,7 @@ interface Actionable {
* Set action key
*
* @param int $actionKey Action key
* @return \FML\Types\Actionable|static
* @return static
*/
public function setActionKey($actionKey);
}

View File

@ -15,7 +15,7 @@ interface BgColorable {
* Set background color
*
* @param string $bgColor Background color
* @return \FML\Types\BgColorable|static
* @return static
*/
public function setBgColor($bgColor);
}

View File

@ -17,14 +17,14 @@ interface Container {
* Add a new child Element
*
* @param Renderable $child Child Control to add
* @return \FML\Types\Container|static
* @return static
*/
public function add(Renderable $child);
/**
* Remove all children
*
* @return \FML\Types\Container|static
* @return static
*/
public function removeChildren();
@ -32,7 +32,7 @@ interface Container {
* Set the Format object of the Container
*
* @param Format $format New Format object
* @return \FML\Types\Container|static
* @return static
*/
public function setFormat(Format $format);
@ -40,7 +40,7 @@ interface Container {
* Get the Format object of the Container
*
* @param bool $createIfEmpty (optional) Whether the Format object should be created if it's not set
* @return \FML\Elements\Format|static
* @return \FML\Elements\Format
*/
public function getFormat($createIfEmpty = true);
}

View File

@ -15,7 +15,7 @@ interface Linkable {
* Set url
*
* @param string $url Link url
* @return \FML\Types\Linkable|static
* @return static
*/
public function setUrl($url);
@ -23,7 +23,7 @@ interface Linkable {
* Set url id to use from Dico
*
* @param string $urlId Url id
* @return \FML\Types\Linkable|static
* @return static
*/
public function setUrlId($urlId);
@ -31,7 +31,7 @@ interface Linkable {
* Set manialink
*
* @param string $manialink Manialink name
* @return \FML\Types\Linkable|static
* @return static
*/
public function setManialink($manialink);
@ -39,7 +39,7 @@ interface Linkable {
* Set manialink id to use from Dico
*
* @param string $manialinkId Manialink id
* @return \FML\Types\Linkable|static
* @return static
*/
public function setManialinkId($manialinkId);
}

View File

@ -15,7 +15,7 @@ interface NewLineable {
* Set auto new line
*
* @param bool $autoNewLine Whether the Control should insert new lines automatically
* @return \FML\Types\NewLineable|static
* @return static
*/
public function setAutoNewLine($autoNewLine);
}

View File

@ -15,7 +15,7 @@ interface Playable {
* Set data
*
* @param string $data Media url
* @return \FML\Types\Playable|static
* @return static
*/
public function setData($data);
@ -23,7 +23,7 @@ interface Playable {
* Set data id to use from Dico
*
* @param string $dataId Data id
* @return \FML\Types\Playable|static
* @return static
*/
public function setDataId($dataId);
@ -31,7 +31,7 @@ interface Playable {
* Set play
*
* @param bool $play Whether the Control should start playing automatically
* @return \FML\Types\Playable|static
* @return static
*/
public function setPlay($play);
@ -39,7 +39,7 @@ interface Playable {
* Set looping
*
* @param bool $looping Whether the Control should play looping
* @return \FML\Types\Playable|static
* @return static
*/
public function setLooping($looping);
@ -47,7 +47,7 @@ interface Playable {
* Set music
*
* @param bool $music Whether the Control represents background music
* @return \FML\Types\Playable|static
* @return static
*/
public function setMusic($music);
@ -55,7 +55,7 @@ interface Playable {
* Set volume
*
* @param float $volume Media volume
* @return \FML\Types\Playable|static
* @return static
*/
public function setVolume($volume);
}

View File

@ -15,7 +15,7 @@ interface Scriptable {
* Set script events
*
* @param bool $scriptEvents Whether script events should be enabled
* @return \FML\Types\Scriptable|static
* @return static
*/
public function setScriptEvents($scriptEvents);
}

View File

@ -15,7 +15,7 @@ interface Styleable {
* Set style
*
* @param string $style Style name
* @return \FML\Types\Styleable|static
* @return static
*/
public function setStyle($style);
}

View File

@ -15,7 +15,7 @@ interface SubStyleable {
* Set sub style
*
* @param string $subStyle SubStyle name
* @return \FML\Types\SubStyleable|static
* @return static
*/
public function setSubStyle($subStyle);
@ -24,7 +24,7 @@ interface SubStyleable {
*
* @param string $style Style name
* @param string $subStyle SubStyle name
* @return \FML\Types\SubStyleable|static
* @return static
*/
public function setStyles($style, $subStyle);
}

View File

@ -15,7 +15,7 @@ interface TextFormatable {
* Set text size
*
* @param int $textSize Text size
* @return \FML\Types\TextFormatable|static
* @return static
*/
public function setTextSize($textSize);
@ -23,7 +23,7 @@ interface TextFormatable {
* Set text color
*
* @param string $textColor Text color
* @return \FML\Types\TextFormatable|static
* @return static
*/
public function setTextColor($textColor);
@ -31,7 +31,7 @@ interface TextFormatable {
* Set area color
*
* @param string $areaColor Area color
* @return \FML\Types\TextFormatable|static
* @return static
*/
public function setAreaColor($areaColor);
@ -39,7 +39,7 @@ interface TextFormatable {
* Set area focus color
*
* @param string $areaFocusColor Area focus color
* @return \FML\Types\TextFormatable|static
* @return static
*/
public function setAreaFocusColor($areaFocusColor);
}

View File

@ -28,7 +28,7 @@ class UniqueID {
/**
* Create a new Unique ID object
*
* @return \FML\UniqueID|static
* @return static
*/
public static function create() {
return new static();