removed 'application' folder to have everything in the root directory
This commit is contained in:
57
libs/FML/Types/Actionable.php
Normal file
57
libs/FML/Types/Actionable.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements that support the action attribute
|
||||
*
|
||||
* @author steeffeen
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Actionable {
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
const ACTION_0 = '0';
|
||||
const ACTION_BACK = 'back';
|
||||
const ACTION_ENTER = 'enter';
|
||||
const ACTION_HOME = 'home';
|
||||
const ACTION_MENU_SOLO = 'menu_solo';
|
||||
const ACTION_MENU_COMPETITIONS = 'menu_competitions';
|
||||
const ACTION_MENU_LOCAL = 'menu_local';
|
||||
const ACTION_MENU_INTERNET = 'menu_internet';
|
||||
const ACTION_MENU_EDITORS = 'menu_editors';
|
||||
const ACTION_MENU_PROFILE = 'menu_profile';
|
||||
const ACTION_QUIT = 'quit';
|
||||
const ACTION_QUITSERVER = 'maniaplanet:quitserver';
|
||||
const ACTION_SAVEREPLAY = 'maniaplanet:savereplay';
|
||||
const ACTION_TOGGLESPEC = 'maniaplanet:togglespec';
|
||||
const ACTIONKEY_F5 = 1;
|
||||
const ACTIONKEY_F6 = 2;
|
||||
const ACTIONKEY_F7 = 3;
|
||||
const ACTIONKEY_F8 = 4;
|
||||
|
||||
/**
|
||||
* Set action
|
||||
*
|
||||
* @param string $action Action name
|
||||
* @return static
|
||||
*/
|
||||
public function setAction($action);
|
||||
|
||||
/**
|
||||
* Get the assigned action
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAction();
|
||||
|
||||
/**
|
||||
* Set action key
|
||||
*
|
||||
* @param int $actionKey Action key
|
||||
* @return static
|
||||
*/
|
||||
public function setActionKey($actionKey);
|
||||
}
|
21
libs/FML/Types/BgColorable.php
Normal file
21
libs/FML/Types/BgColorable.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with background color attribute
|
||||
*
|
||||
* @author steeffeen
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface BgColorable {
|
||||
|
||||
/**
|
||||
* Set background color
|
||||
*
|
||||
* @param string $bgColor Background color
|
||||
* @return static
|
||||
*/
|
||||
public function setBgColor($bgColor);
|
||||
}
|
46
libs/FML/Types/Container.php
Normal file
46
libs/FML/Types/Container.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
use FML\Elements\Format;
|
||||
|
||||
/**
|
||||
* Interface for Element being able to contain other Controls
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Container {
|
||||
|
||||
/**
|
||||
* Add a new child Element
|
||||
*
|
||||
* @param Renderable $child Child Control to add
|
||||
* @return static
|
||||
*/
|
||||
public function add(Renderable $child);
|
||||
|
||||
/**
|
||||
* Remove all children
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function removeChildren();
|
||||
|
||||
/**
|
||||
* Set the Format object of the Container
|
||||
*
|
||||
* @param Format $format New Format object
|
||||
* @return static
|
||||
*/
|
||||
public function setFormat(Format $format);
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public function getFormat($createIfEmpty = true);
|
||||
}
|
45
libs/FML/Types/Linkable.php
Normal file
45
libs/FML/Types/Linkable.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with url attributes
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Linkable {
|
||||
|
||||
/**
|
||||
* Set url
|
||||
*
|
||||
* @param string $url Link url
|
||||
* @return static
|
||||
*/
|
||||
public function setUrl($url);
|
||||
|
||||
/**
|
||||
* Set url id to use from Dico
|
||||
*
|
||||
* @param string $urlId Url id
|
||||
* @return static
|
||||
*/
|
||||
public function setUrlId($urlId);
|
||||
|
||||
/**
|
||||
* Set manialink
|
||||
*
|
||||
* @param string $manialink Manialink name
|
||||
* @return static
|
||||
*/
|
||||
public function setManialink($manialink);
|
||||
|
||||
/**
|
||||
* Set manialink id to use from Dico
|
||||
*
|
||||
* @param string $manialinkId Manialink id
|
||||
* @return static
|
||||
*/
|
||||
public function setManialinkId($manialinkId);
|
||||
}
|
21
libs/FML/Types/NewLineable.php
Normal file
21
libs/FML/Types/NewLineable.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with autonewline attribute
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface NewLineable {
|
||||
|
||||
/**
|
||||
* Set auto new line
|
||||
*
|
||||
* @param bool $autoNewLine Whether the Control should insert new lines automatically
|
||||
* @return static
|
||||
*/
|
||||
public function setAutoNewLine($autoNewLine);
|
||||
}
|
61
libs/FML/Types/Playable.php
Normal file
61
libs/FML/Types/Playable.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with media attributes
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Playable {
|
||||
|
||||
/**
|
||||
* Set data
|
||||
*
|
||||
* @param string $data Media url
|
||||
* @return static
|
||||
*/
|
||||
public function setData($data);
|
||||
|
||||
/**
|
||||
* Set data id to use from Dico
|
||||
*
|
||||
* @param string $dataId Data id
|
||||
* @return static
|
||||
*/
|
||||
public function setDataId($dataId);
|
||||
|
||||
/**
|
||||
* Set play
|
||||
*
|
||||
* @param bool $play Whether the Control should start playing automatically
|
||||
* @return static
|
||||
*/
|
||||
public function setPlay($play);
|
||||
|
||||
/**
|
||||
* Set looping
|
||||
*
|
||||
* @param bool $looping Whether the Control should play looping
|
||||
* @return static
|
||||
*/
|
||||
public function setLooping($looping);
|
||||
|
||||
/**
|
||||
* Set music
|
||||
*
|
||||
* @param bool $music Whether the Control represents background music
|
||||
* @return static
|
||||
*/
|
||||
public function setMusic($music);
|
||||
|
||||
/**
|
||||
* Set volume
|
||||
*
|
||||
* @param float $volume Media volume
|
||||
* @return static
|
||||
*/
|
||||
public function setVolume($volume);
|
||||
}
|
21
libs/FML/Types/Renderable.php
Normal file
21
libs/FML/Types/Renderable.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for renderable Elements
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Renderable {
|
||||
|
||||
/**
|
||||
* Render the XML element
|
||||
*
|
||||
* @param \DOMDocument $domDocument DOMDocument for which the XML element should be rendered
|
||||
* @return \DOMElement
|
||||
*/
|
||||
public function render(\DOMDocument $domDocument);
|
||||
}
|
20
libs/FML/Types/ScriptFeatureable.php
Normal file
20
libs/FML/Types/ScriptFeatureable.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements supporting ScriptFeatures
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface ScriptFeatureable {
|
||||
|
||||
/**
|
||||
* Get the assigned Script Features of the Element
|
||||
*
|
||||
* @return \FML\Script\Features\ScriptFeature[]
|
||||
*/
|
||||
public function getScriptFeatures();
|
||||
}
|
21
libs/FML/Types/Scriptable.php
Normal file
21
libs/FML/Types/Scriptable.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with scriptevents attribute
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Scriptable {
|
||||
|
||||
/**
|
||||
* Set script events
|
||||
*
|
||||
* @param bool $scriptEvents Whether script events should be enabled
|
||||
* @return static
|
||||
*/
|
||||
public function setScriptEvents($scriptEvents);
|
||||
}
|
21
libs/FML/Types/Styleable.php
Normal file
21
libs/FML/Types/Styleable.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with style attribute
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Styleable {
|
||||
|
||||
/**
|
||||
* Set style
|
||||
*
|
||||
* @param string $style Style name
|
||||
* @return static
|
||||
*/
|
||||
public function setStyle($style);
|
||||
}
|
30
libs/FML/Types/SubStyleable.php
Normal file
30
libs/FML/Types/SubStyleable.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with substyle attribute
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface SubStyleable {
|
||||
|
||||
/**
|
||||
* Set sub style
|
||||
*
|
||||
* @param string $subStyle SubStyle name
|
||||
* @return static
|
||||
*/
|
||||
public function setSubStyle($subStyle);
|
||||
|
||||
/**
|
||||
* Set style and sub style
|
||||
*
|
||||
* @param string $style Style name
|
||||
* @param string $subStyle SubStyle name
|
||||
* @return static
|
||||
*/
|
||||
public function setStyles($style, $subStyle);
|
||||
}
|
53
libs/FML/Types/TextFormatable.php
Normal file
53
libs/FML/Types/TextFormatable.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for Elements with formatable text
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface TextFormatable {
|
||||
|
||||
/**
|
||||
* Set text size
|
||||
*
|
||||
* @param int $textSize Text size
|
||||
* @return static
|
||||
*/
|
||||
public function setTextSize($textSize);
|
||||
|
||||
/**
|
||||
* Set text font
|
||||
*
|
||||
* @param string $textFont
|
||||
* @return static
|
||||
*/
|
||||
public function setTextFont($textFont);
|
||||
|
||||
/**
|
||||
* Set text color
|
||||
*
|
||||
* @param string $textColor Text color
|
||||
* @return static
|
||||
*/
|
||||
public function setTextColor($textColor);
|
||||
|
||||
/**
|
||||
* Set area color
|
||||
*
|
||||
* @param string $areaColor Area color
|
||||
* @return static
|
||||
*/
|
||||
public function setAreaColor($areaColor);
|
||||
|
||||
/**
|
||||
* Set area focus color
|
||||
*
|
||||
* @param string $areaFocusColor Area focus color
|
||||
* @return static
|
||||
*/
|
||||
public function setAreaFocusColor($areaFocusColor);
|
||||
}
|
Reference in New Issue
Block a user