Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SMW\Scribunto\ScribuntoLuaLibrary Class Reference
Inheritance diagram for SMW\Scribunto\ScribuntoLuaLibrary:
Inheritance graph
[legend]
Collaboration diagram for SMW\Scribunto\ScribuntoLuaLibrary:
Collaboration graph
[legend]

Public Member Functions

 register ()
 
 ask ( $arguments=null)
 
 getPropertyType ( $propertyName=null)
 
 getQueryResult ( $arguments=null)
 
 info ( $text, $icon='info')
 
 set ( $arguments)
 
 subobject ( $arguments, $subobjectId=null)
 

Public Attributes

const SMW_ERROR_FIELD = 'error'
 

Detailed Description

GNU GPL v2+

Since
1.0
Author
mwjames

Member Function Documentation

◆ ask()

SMW\Scribunto\ScribuntoLuaLibrary::ask (   $arguments = null)

This mirrors the functionality of the parser function ask and makes it available in lua.

Since
1.0
Parameters
string | array$argumentsparameters passed from lua, string or array depending on call
Returns
array array( null ) or array[]

◆ getPropertyType()

SMW\Scribunto\ScribuntoLuaLibrary::getPropertyType (   $propertyName = null)

Returns property type

Since
1.0
Parameters
string$propertyName
Returns
array

◆ getQueryResult()

SMW\Scribunto\ScribuntoLuaLibrary::getQueryResult (   $arguments = null)

Returns query results in for of the standard API return format

Since
1.0
Parameters
string | array$arguments
Returns
array

◆ info()

SMW\Scribunto\ScribuntoLuaLibrary::info (   $text,
  $icon = 'info' 
)

This mirrors the functionality of the parser function info and makes it available to lua.

Since
1.0
Parameters
string$texttext to show inside the info popup
string$iconidentifier for the icon to use
Returns
string[]

◆ register()

SMW\Scribunto\ScribuntoLuaLibrary::register ( )
Since
1.0

◆ set()

SMW\Scribunto\ScribuntoLuaLibrary::set (   $arguments)

This mirrors the functionality of the parser function set and makes it available in lua.

Since
1.0
Parameters
string | array$argumentsarguments passed from lua, string or array depending on call
Returns
null|array|array[]

◆ subobject()

SMW\Scribunto\ScribuntoLuaLibrary::subobject (   $arguments,
  $subobjectId = null 
)

This mirrors the functionality of the parser function subobject and makes it available to lua.

Parameters
string | array$argumentsarguments passed from lua, string or array depending on call
string$subobjectIdif you need to manually assign an id, do this here
Returns
null|array|array[]

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

About | General disclaimer | Privacy policy