22 global $wgPFEnableStringFunctions;
25 $parser->setFunctionHook(
'if',
'ExtParserFunctions::ifObj', Parser::SFH_OBJECT_ARGS );
26 $parser->setFunctionHook(
'ifeq',
'ExtParserFunctions::ifeqObj', Parser::SFH_OBJECT_ARGS );
27 $parser->setFunctionHook(
'switch',
'ExtParserFunctions::switchObj', Parser::SFH_OBJECT_ARGS );
28 $parser->setFunctionHook(
'ifexist',
'ExtParserFunctions::ifexistObj', Parser::SFH_OBJECT_ARGS );
29 $parser->setFunctionHook(
'ifexpr',
'ExtParserFunctions::ifexprObj', Parser::SFH_OBJECT_ARGS );
30 $parser->setFunctionHook(
'iferror',
'ExtParserFunctions::iferrorObj', Parser::SFH_OBJECT_ARGS );
31 $parser->setFunctionHook(
'time',
'ExtParserFunctions::timeObj', Parser::SFH_OBJECT_ARGS );
32 $parser->setFunctionHook(
'timel',
'ExtParserFunctions::localTimeObj', Parser::SFH_OBJECT_ARGS );
34 $parser->setFunctionHook(
'expr',
'ExtParserFunctions::expr' );
35 $parser->setFunctionHook(
'rel2abs',
'ExtParserFunctions::rel2abs' );
36 $parser->setFunctionHook(
'titleparts',
'ExtParserFunctions::titleparts' );
39 if ( $wgPFEnableStringFunctions ) {
40 $parser->setFunctionHook(
'len',
'ExtParserFunctions::runLen' );
41 $parser->setFunctionHook(
'pos',
'ExtParserFunctions::runPos' );
42 $parser->setFunctionHook(
'rpos',
'ExtParserFunctions::runRPos' );
43 $parser->setFunctionHook(
'sub',
'ExtParserFunctions::runSub' );
44 $parser->setFunctionHook(
'count',
'ExtParserFunctions::runCount' );
45 $parser->setFunctionHook(
'replace',
'ExtParserFunctions::runReplace' );
46 $parser->setFunctionHook(
'explode',
'ExtParserFunctions::runExplode' );
47 $parser->setFunctionHook(
'urldecode',
'ExtParserFunctions::runUrlDecode' );