MediaWiki
1.34.0
|
Public Member Functions | |
formatLimitData ( $key, &$value, &$report, $isHTML, $localize) | |
Format limit report data. More... | |
getPerformanceCharacteristics () | |
Get performance characteristics of the Lua engine/interpreter. More... | |
getResourceUsage ( $resource) | |
Get CPU and memory usage information, if the script engine provides it. More... | |
getSoftwareInfo (array &$software) | |
Get software information for Special:Version. More... | |
reportLimitData (ParserOutput $output) | |
Add limit report data to a ParserOutput object. More... | |
Public Member Functions inherited from Scribunto_LuaEngine | |
addWarning ( $text) | |
Adds a warning to be displayed upon preview. More... | |
callParserFunction ( $frameId, $function, $args) | |
Handler for callParserFunction() More... | |
checkNumber ( $funcName, $args, $index0) | |
Workalike for luaL_checknumber() More... | |
checkString ( $funcName, $args, $index0) | |
Workalike for luaL_checkstring() More... | |
checkType ( $funcName, $args, $index0, $type, $msgType) | |
Workalike for luaL_checktype() More... | |
destroy () | |
executeFunctionChunk ( $chunk, $frame) | |
Execute a module function chunk. More... | |
executeModule ( $chunk, $functionName, $frame) | |
Execute a module chunk in a new isolated environment, and return the specified function. More... | |
expandTemplate ( $frameId, $titleText, $args) | |
Handler for expandTemplate() More... | |
frameExists ( $frameId) | |
Handler for frameExists() More... | |
getAllExpandedArguments ( $frameId) | |
Handler for getAllExpandedArguments() More... | |
getCodeEditorLanguage () | |
Get the language for Ace code editor. More... | |
getExpandedArgument ( $frameId, $name) | |
Handler for getExpandedArgument() More... | |
getFrameTitle ( $frameId) | |
Handler for getTitle() More... | |
getGeSHiLanguage () | |
Get the language for GeSHi syntax highlighter. More... | |
getInterpreter () | |
Get the current interpreter object. More... | |
getLuaLibDir () | |
Return the base path for Lua modules. More... | |
incrementExpensiveFunctionCount () | |
Increment the expensive function count, and throw if limit exceeded. More... | |
isSubsting () | |
Return whether the parser is currently substing. More... | |
load () | |
Initialise the interpreter and the base environment. More... | |
loadPackage ( $name) | |
Handler for the loadPackage() callback. More... | |
loadPHPLibrary ( $name) | |
Handler for the loadPHPLibrary() callback. More... | |
newChildFrame ( $frameId, $title, array $args) | |
Handler for newChildFrame() More... | |
newLuaError ( $message, $params=[]) | |
preprocess ( $frameId, $text) | |
Handler for preprocess() More... | |
registerInterface ( $moduleFileName, $interfaceFuncs, $setupOptions=[]) | |
Register a Lua Library. More... | |
runConsole (array $params) | |
Run an interactive console request. More... | |
setTTL ( $ttl) | |
Handler for setTTL() More... | |
Public Member Functions inherited from ScribuntoEngineBase | |
__construct (array $options) | |
__destruct () | |
fetchModuleFromParser (Title $title) | |
Load a module from some parser-defined template loading mechanism and register a parser output dependency. More... | |
getDefaultExceptionParams () | |
getOption ( $optionName) | |
Get an element from the configuration array. More... | |
getParser () | |
getTitle () | |
newException ( $message, array $params=[]) | |
setTitle ( $title) | |
validate ( $text, $chunkName=false) | |
Validates the script and returns a Status object containing the syntax errors for the given code. More... | |
Public Attributes | |
$loaded = false | |
$options | |
Public Attributes inherited from Scribunto_LuaEngine | |
const | MAX_EXPAND_CACHE_SIZE = 100 |
Public Attributes inherited from ScribuntoEngineBase | |
const | CPU_SECONDS = 1 |
const | MEM_PEAK_BYTES = 2 |
Protected Member Functions | |
getMwLuaLine ( $lineNum) | |
newInterpreter () | |
Create a new interpreter object. More... | |
Protected Member Functions inherited from Scribunto_LuaEngine | |
formatHtmlLogs ( $logs, $localize) | |
Format the logged data for HTML output. More... | |
getFrameById ( $frameId) | |
Helper function for the implementation of frame methods. More... | |
getLogBuffer () | |
Get data logged by modules. More... | |
loadLibraryFromFile ( $fileName) | |
Load a library from the given file and execute it in the base environment. More... | |
newModule ( $text, $chunkName) | |
normalizeModuleFileName ( $fileName) | |
Normalize a lua module to its full path. More... | |
Protected Member Functions inherited from ScribuntoEngineBase | |
getLibraries ( $engine, array $coreLibraries=[]) | |
Load a list of all libraries supported by this engine. More... | |
getLibraryPaths ( $engine, array $coreLibraryPaths=[]) | |
Load a list of all paths libraries can be in for this engine. More... | |
Protected Attributes | |
Scribunto_LuaSandboxInterpreter | $interpreter |
$lineCache = [] | |
Protected Attributes inherited from Scribunto_LuaEngine | |
$availableLibraries = [] | |
array | $currentFrames = [] |
$expandCache = [] | |
Scribunto_LuaInterpreter | $interpreter |
$loaded = false | |
array | $mw |
Protected Attributes inherited from ScribuntoEngineBase | |
ScribuntoModuleBase[] | $modules = [] |
array | $options |
Parser | $parser |
Title | $title |
Private Member Functions | |
getLimitReportData () | |
Additional Inherited Members | |
Static Public Member Functions inherited from Scribunto_LuaEngine | |
static | newAutodetectEngine (array $options) |
If luasandbox is installed and usable then use it, otherwise. More... | |
Static Protected Attributes inherited from Scribunto_LuaEngine | |
static array | $libraryClasses |
Libraries to load. More... | |
static array | $libraryPaths |
Paths for modules that may be loaded from Lua. More... | |
Definition at line 3 of file Engine.php.
Scribunto_LuaSandboxEngine::formatLimitData | ( | $key, | |
& | $value, | ||
& | $report, | ||
$isHTML, | |||
$localize | |||
) |
Format limit report data.
string | $key | |
mixed | &$value | |
string | &$report | |
bool | $isHTML | |
bool | $localize |
Reimplemented from ScribuntoEngineBase.
Definition at line 123 of file Engine.php.
References $lang, $line, ScribuntoEngineBase\$title, $wgLang, Language\factory(), Scribunto_LuaEngine\formatHtmlLogs(), Title\hasContentModel(), Linker\link(), Title\newFromText(), and wfMessage().
|
private |
Definition at line 52 of file Engine.php.
References $line, $lines, $t, Scribunto_LuaEngine\getLogBuffer(), getMwLuaLine(), Scribunto_LuaEngine\load(), Scribunto_LuaSandboxInterpreter\PERCENT, and Scribunto_LuaSandboxInterpreter\SECONDS.
Referenced by reportLimitData().
|
protected |
Definition at line 203 of file Engine.php.
References Scribunto_LuaEngine\getLuaLibDir().
Referenced by getLimitReportData().
Scribunto_LuaSandboxEngine::getPerformanceCharacteristics | ( | ) |
Get performance characteristics of the Lua engine/interpreter.
phpCallsRequireSerialization: boolean whether calls between PHP and Lua functions require (slow) serialization of parameters and return values
Reimplemented from Scribunto_LuaEngine.
Definition at line 12 of file Engine.php.
Scribunto_LuaSandboxEngine::getResourceUsage | ( | $resource | ) |
Get CPU and memory usage information, if the script engine provides it.
If the script engine is capable of reporting CPU and memory usage data, it should override this implementation.
int | $resource | One of ScribuntoEngineBase::CPU_SECONDS or ScribuntoEngineBase::MEM_PEAK_BYTES. |
Reimplemented from ScribuntoEngineBase.
Definition at line 40 of file Engine.php.
References ScribuntoEngineBase\CPU_SECONDS, Scribunto_LuaEngine\load(), and ScribuntoEngineBase\MEM_PEAK_BYTES.
Scribunto_LuaSandboxEngine::getSoftwareInfo | ( | array & | $software | ) |
Get software information for Special:Version.
array | &$software |
Reimplemented from ScribuntoEngineBase.
Definition at line 18 of file Engine.php.
References Scribunto_LuaSandboxInterpreter\checkLuaSandboxVersion().
|
protected |
Create a new interpreter object.
Reimplemented from Scribunto_LuaEngine.
Definition at line 210 of file Engine.php.
Scribunto_LuaSandboxEngine::reportLimitData | ( | ParserOutput | $output | ) |
Add limit report data to a ParserOutput object.
ParserOutput | $output | ParserOutput object in which to add limit data |
Reimplemented from ScribuntoEngineBase.
Definition at line 113 of file Engine.php.
References $output, and getLimitReportData().
|
protected |
Definition at line 10 of file Engine.php.
|
protected |
Definition at line 5 of file Engine.php.
Scribunto_LuaSandboxEngine::$loaded = false |
Definition at line 4 of file Engine.php.
Scribunto_LuaSandboxEngine::$options |
Definition at line 4 of file Engine.php.