MediaWiki  1.34.0
ScribuntoModuleBase Class Reference

Class that represents a module. More...

Inheritance diagram for ScribuntoModuleBase:
Collaboration diagram for ScribuntoModuleBase:

Public Member Functions

 __construct (ScribuntoEngineBase $engine, $code, $chunkName)
 
 getChunkName ()
 
 getCode ()
 
 getEngine ()
 
 invoke ( $name, $frame)
 Invoke the function with the specified name. More...
 
 validate ()
 Validates the script and returns a Status object containing the syntax errors for the given code. More...
 

Protected Attributes

string bool $chunkName
 
string $code
 
ScribuntoEngineBase $engine
 

Detailed Description

Class that represents a module.

Responsible for initial module parsing and maintaining the contents of the module.

Definition at line 296 of file Base.php.

Constructor & Destructor Documentation

◆ __construct()

ScribuntoModuleBase::__construct ( ScribuntoEngineBase  $engine,
  $code,
  $chunkName 
)
Parameters
ScribuntoEngineBase$engine
string$code
string | bool$chunkName

Definition at line 317 of file Base.php.

References $chunkName, $code, and $engine.

Member Function Documentation

◆ getChunkName()

ScribuntoModuleBase::getChunkName ( )
Returns
string|bool

Definition at line 340 of file Base.php.

References $chunkName.

◆ getCode()

ScribuntoModuleBase::getCode ( )
Returns
string

Definition at line 333 of file Base.php.

References $code.

◆ getEngine()

ScribuntoModuleBase::getEngine ( )
Returns
ScribuntoEngineBase

Definition at line 326 of file Base.php.

References $engine.

◆ invoke()

ScribuntoModuleBase::invoke (   $name,
  $frame 
)
abstract

Invoke the function with the specified name.

Parameters
string$name
PPFrame$frame
Returns
string

Reimplemented in Scribunto_LuaModule.

◆ validate()

ScribuntoModuleBase::validate ( )
abstract

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

Returns
Status

Reimplemented in Scribunto_LuaModule.

Member Data Documentation

◆ $chunkName

string bool ScribuntoModuleBase::$chunkName
protected

Definition at line 310 of file Base.php.

Referenced by __construct(), Scribunto_LuaModule\__construct(), and getChunkName().

◆ $code

string ScribuntoModuleBase::$code
protected

Definition at line 305 of file Base.php.

Referenced by __construct(), Scribunto_LuaModule\__construct(), and getCode().

◆ $engine

ScribuntoEngineBase ScribuntoModuleBase::$engine
protected

Definition at line 300 of file Base.php.

Referenced by __construct(), and getEngine().


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