[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 <?php 2 3 class Scribunto_LuaParserFunctionsLibrary extends Scribunto_LuaLibraryBase { 4 public function register() { 5 $lib = array( 6 'expr' => array( $this, 'expr' ), 7 ); 8 9 $this->getEngine()->registerInterface( __DIR__ . '/mw.ext.ParserFunctions.lua', $lib, array() ); 10 } 11 12 public function expr( $expression = null ) { 13 $this->checkType( 'mw.ext.ParserFunctions.expr', 1, $expression, 'string' ); 14 try { 15 return array( ExtParserFunctions::getExprParser()->doExpression( $expression ) ); 16 } catch ( ExprError $e ) { 17 throw new Scribunto_LuaError( $e->getMessage() ); 18 } 19 } 20 21 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |