TrackManiaControl/application/core/Libs/FML/Script/ScriptFunction.php
Steffen Schröder c0e2ed7370 fixes
2014-05-01 17:35:46 +02:00

70 lines
1.2 KiB
PHP

<?php
namespace FML\Script;
/**
* Class representing a Function of the ManiaLink Script
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class ScriptFunction {
/*
* Protected Properties
*/
protected $name = null;
protected $text = null;
/**
* Construct a new Script Function
*
* @param string $name (optional) Function Name
* @param string $text (optional) Function Text
*/
public function __construct($name = null, $text = null) {
$this->setName($name);
$this->setText($text);
}
/**
* Set the Name
*
* @param string $name Function Name
* @return \FML\Script\ScriptFunction
*/
public function setName($name) {
$this->name = (string) $name;
return $this;
}
/**
* Get the Name
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
* Set the Text
*
* @param string $text Function Text
* @return \FML\Script\ScriptFunction
*/
public function setText($text) {
$this->text = (string) $text;
return $this;
}
/**
* Get the Script Function Text
*
* @return string
*/
public function __toString() {
return $this->text;
}
}