<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Handles compiling Mustache templates into PHP rendering functions
*
$fastHash = md5( $fileContents );
// Fetch a secret key for building a keyed hash of the PHP code
- $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
$secretKey = $config->get( 'SecretKey' );
if ( $secretKey ) {
* @code
* echo $templateParser->processTemplate(
* 'ExampleTemplate',
- * array(
+ * [
* 'username' => $user->getName(),
* 'message' => 'Hello!'
- * )
+ * ]
* );
* @endcode
* @param string $templateName The name of the template