MediaWiki  1.34.0
Scribunto_LuaModule Class Reference
Inheritance diagram for Scribunto_LuaModule:
Collaboration diagram for Scribunto_LuaModule:

Public Member Functions

 __construct (Scribunto_LuaEngine $engine, $code, $chunkName)
 
 getInitChunk ()
 Get the chunk which, when called, will return the export table. More...
 
 invoke ( $name, $frame)
 Invoke a function within the module. More...
 
 validate ()
 Validates the script and returns a Status object containing the syntax errors for the given code. More...
 
- Public Member Functions inherited from ScribuntoModuleBase
 __construct (ScribuntoEngineBase $engine, $code, $chunkName)
 
 getChunkName ()
 
 getCode ()
 
 getEngine ()
 

Protected Attributes

Scribunto_LuaEngine $engine
 
mixed $initChunk
 
- Protected Attributes inherited from ScribuntoModuleBase
string bool $chunkName
 
string $code
 
ScribuntoEngineBase $engine
 

Detailed Description

Definition at line 918 of file LuaCommon.php.

Constructor & Destructor Documentation

◆ __construct()

Scribunto_LuaModule::__construct ( Scribunto_LuaEngine  $engine,
  $code,
  $chunkName 
)
Parameters
Scribunto_LuaEngine$engine
string$code
string | bool$chunkName

Definition at line 934 of file LuaCommon.php.

References ScribuntoModuleBase\$chunkName, ScribuntoModuleBase\$code, and $engine.

Member Function Documentation

◆ getInitChunk()

Scribunto_LuaModule::getInitChunk ( )

Get the chunk which, when called, will return the export table.

Returns
mixed

Definition at line 951 of file LuaCommon.php.

References $initChunk.

Referenced by invoke(), and validate().

◆ invoke()

Scribunto_LuaModule::invoke (   $name,
  $frame 
)

Invoke a function within the module.

Return the expanded wikitext result.

Parameters
string$name
PPFrame$frame
Exceptions
ScribuntoException
Returns
string|null

Reimplemented from ScribuntoModuleBase.

Definition at line 969 of file LuaCommon.php.

References getInitChunk().

◆ validate()

Scribunto_LuaModule::validate ( )

Validates the script and returns a Status object containing the syntax errors for the given code.

Returns
Status

Reimplemented from ScribuntoModuleBase.

Definition at line 938 of file LuaCommon.php.

References getInitChunk(), StatusValue\newGood(), and ScribuntoException\toStatus().

Member Data Documentation

◆ $engine

Scribunto_LuaEngine Scribunto_LuaModule::$engine
protected

Definition at line 927 of file LuaCommon.php.

Referenced by __construct().

◆ $initChunk

mixed Scribunto_LuaModule::$initChunk
protected

Definition at line 922 of file LuaCommon.php.

Referenced by getInitChunk().


The documentation for this class was generated from the following file: