MediaWiki REL1_34
Scribunto_LuaUriLibrary Class Reference
Inheritance diagram for Scribunto_LuaUriLibrary:
Collaboration diagram for Scribunto_LuaUriLibrary:

Public Member Functions

 anchorEncode ( $s)
 Handler for anchorEncode.
 
 canonicalUrl ( $page, $query)
 Handler for canonicalUrl.
 
 fullUrl ( $page, $query)
 Handler for fullUrl.
 
 localUrl ( $page, $query)
 Handler for localUrl.
 
 register ()
 Called to register the library.
 
- Public Member Functions inherited from Scribunto_LuaLibraryBase
 __construct (Scribunto_LuaEngine $engine)
 
 incrementExpensiveFunctionCount ()
 Increment the expensive function count, and throw if limit exceeded.
 

Private Member Functions

 getUrl ( $func, $page, $query)
 

Additional Inherited Members

- Protected Member Functions inherited from Scribunto_LuaLibraryBase
 checkType ( $name, $argIdx, $arg, $expectType)
 Check the type of a variable.
 
 checkTypeOptional ( $name, $argIdx, &$arg, $expectType, $default)
 Check the type of a variable, with default if null.
 
 getEngine ()
 Get the engine.
 
 getInterpreter ()
 Get the interpreter.
 
 getLuaType ( $var)
 Get the Lua type corresponding to the type of the variable.
 
 getParser ()
 Get the parser.
 
 getParserOptions ()
 Get the parser options.
 
 getTitle ()
 Get the title.
 

Detailed Description

Definition at line 3 of file UriLibrary.php.

Member Function Documentation

◆ anchorEncode()

Scribunto_LuaUriLibrary::anchorEncode ( $s)

Handler for anchorEncode.

Definition at line 23 of file UriLibrary.php.

References $s, CoreParserFunctions\anchorencode(), and Scribunto_LuaLibraryBase\getParser().

◆ canonicalUrl()

Scribunto_LuaUriLibrary::canonicalUrl ( $page,
$query )

Handler for canonicalUrl.

Definition at line 79 of file UriLibrary.php.

References getUrl().

◆ fullUrl()

Scribunto_LuaUriLibrary::fullUrl ( $page,
$query )

Handler for fullUrl.

Definition at line 68 of file UriLibrary.php.

References getUrl().

◆ getUrl()

Scribunto_LuaUriLibrary::getUrl ( $func,
$page,
$query )
private

Definition at line 29 of file UriLibrary.php.

References $title, NS_FILE, and NS_MEDIA.

Referenced by canonicalUrl(), fullUrl(), and localUrl().

◆ localUrl()

Scribunto_LuaUriLibrary::localUrl ( $page,
$query )

Handler for localUrl.

Definition at line 57 of file UriLibrary.php.

References getUrl().

◆ register()

Scribunto_LuaUriLibrary::register ( )

Called to register the library.

This should do any necessary setup and then call $this->getEngine()->registerInterface(). The value returned by that call should be returned from this function, and must be for 'deferLoad' libraries to work right.

Returns
array Lua package

Reimplemented from Scribunto_LuaLibraryBase.

Definition at line 4 of file UriLibrary.php.

References Scribunto_LuaLibraryBase\getEngine(), and Scribunto_LuaLibraryBase\getTitle().


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