|
The LuaSandbox classIntroductionThe LuaSandbox class creates a Lua environment and allows for execution of Lua code. Class synopsisLuaSandbox
class LuaSandbox
{
/* Constants */
const
int
LuaSandbox::SAMPLES = 0;
const
int
LuaSandbox::SECONDS = 1;
const
int
LuaSandbox::PERCENT = 2;
/* Methods */
public arraybool callFunction(string
$name , mixed ...$args )public void disableProfiler()
public bool enableProfiler(float
$period = 0.02)public float getCPUUsage()
public int getMemoryUsage()
public int getPeakMemoryUsage()
public array getProfilerFunctionReport(int
$units = LuaSandbox::SECONDS)public static array getVersionInfo()
public LuaSandboxFunction loadBinary(string
$code , string $chunkName = '')public LuaSandboxFunction loadString(string
$code , string $chunkName = '')public bool pauseUsageTimer()
public void registerLibrary(string
$libname , array $functions )public void setCPULimit(floatbool
$limit )public void setMemoryLimit(int
$limit )public void unpauseUsageTimer()
public LuaSandboxFunction wrapPhpFunction(callable
}$function )Predefined Constants
|