Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SMW\Scribunto\ScribuntoLuaLibrary Class Reference
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

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[]
SMW\Scribunto\ScribuntoLuaLibrary::getPropertyType (   $propertyName = null)

Returns property type

Since
1.0
Parameters
string$propertyName
Returns
array
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
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[]
SMW\Scribunto\ScribuntoLuaLibrary::register ( )
Since
1.0
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[]
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[]

Member Data Documentation

const SMW\Scribunto\ScribuntoLuaLibrary::SMW_ERROR_FIELD = 'error'

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