mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ParserFunctions
synced 2024-12-23 21:33:18 +00:00
23 lines
478 B
Lua
23 lines
478 B
Lua
|
local ParserFunctions = {}
|
||
|
local php
|
||
|
|
||
|
function ParserFunctions.expr( expression )
|
||
|
return php.expr( expression )
|
||
|
end
|
||
|
|
||
|
function ParserFunctions.setupInterface( options )
|
||
|
-- Boilerplate
|
||
|
ParserFunctions.setupInterface = nil
|
||
|
php = mw_interface
|
||
|
mw_interface = nil
|
||
|
|
||
|
-- Register this library in the "mw" global
|
||
|
mw = mw or {}
|
||
|
mw.ext = mw.ext or {}
|
||
|
mw.ext.ParserFunctions = ParserFunctions
|
||
|
|
||
|
package.loaded['mw.ext.ParserFunctions'] = ParserFunctions
|
||
|
end
|
||
|
|
||
|
return ParserFunctions
|