MediaWiki
1.34.4
|
Public Member Functions | |
callFunction ( $func,... $args) | |
Call a Lua function. More... | |
isLuaFunction ( $object) | |
Test whether an object is a Lua function. More... | |
loadString ( $text, $chunkName) | |
Load a string. More... | |
pauseUsageTimer () | |
Pause CPU usage and limits. More... | |
registerLibrary ( $name, array $functions) | |
Register a library of functions. More... | |
unpauseUsageTimer () | |
Unpause CPU usage and limits. More... | |
wrapPhpFunction ( $callable) | |
Wrap a PHP callable as a Lua function, which can be passed back into Lua. More... | |
Definition at line 3 of file LuaInterpreter.php.
|
abstract |
Call a Lua function.
Return an array of results, with indices starting at zero. If an error occurs, a Scribunto_LuaError will be thrown.
mixed | $func | The function object |
mixed | ...$args Arguments to the function |
Reimplemented in Scribunto_LuaStandaloneInterpreter, and Scribunto_LuaSandboxInterpreter.
|
abstract |
Test whether an object is a Lua function.
object | $object |
Reimplemented in Scribunto_LuaStandaloneInterpreter, and Scribunto_LuaSandboxInterpreter.
|
abstract |
Load a string.
Return an object which can later be passed to callFunction. If there is a pass error, a Scribunto_LuaError will be thrown.
string | $text | The Lua source code |
string | $chunkName | The chunk name |
Reimplemented in Scribunto_LuaStandaloneInterpreter, and Scribunto_LuaSandboxInterpreter.
|
abstract |
Pause CPU usage and limits.
Reimplemented in Scribunto_LuaStandaloneInterpreter, and Scribunto_LuaSandboxInterpreter.
|
abstract |
Register a library of functions.
string | $name | The global variable name to be created or added to. |
array | $functions | An associative array mapping the function name to the callback. The callback may throw a Scribunto_LuaError, which will be caught and raised in the Lua code as a Lua error, catchable with pcall(). |
Reimplemented in Scribunto_LuaStandaloneInterpreter, and Scribunto_LuaSandboxInterpreter.
|
abstract |
Unpause CPU usage and limits.
Reimplemented in Scribunto_LuaStandaloneInterpreter, and Scribunto_LuaSandboxInterpreter.
|
abstract |
Wrap a PHP callable as a Lua function, which can be passed back into Lua.
If an error occurs, a Scribunto_LuaError will be thrown.
callable | $callable | The PHP callable |
Reimplemented in Scribunto_LuaStandaloneInterpreter, and Scribunto_LuaSandboxInterpreter.