The LuaSandbox class

はじめに

The LuaSandbox class creates a Lua environment and allows for execution of Lua code.

クラス概要

LuaSandbox
class LuaSandbox {
/* 定数 */
const int LuaSandbox::SAMPLES = 0;
const int LuaSandbox::SECONDS = 1;
const int LuaSandbox::PERCENT = 2;
/* メソッド */
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)
}

定義済み定数

LuaSandbox::SAMPLES

Used with LuaSandbox::getProfilerFunctionReport to return timings in samples.

LuaSandbox::SECONDS

Used with LuaSandbox::getProfilerFunctionReport to return timings in seconds.

LuaSandbox::PERCENT

Used with LuaSandbox::getProfilerFunctionReport to return timings in percentages of the total.

目次