Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
PHPVariableLoader.php
1<?php
2declare( strict_types = 1 );
3
5
21 public static function loadVariableFromPHPFile( string $_filename, string $_variable ) {
22 if ( !file_exists( $_filename ) ) {
23 return null;
24 } else {
25 require $_filename;
26
27 return $$_variable ?? null;
28 }
29 }
30}
Stuff for handling configuration files in PHP format.
static loadVariableFromPHPFile(string $_filename, string $_variable)
Returns a global variable from PHP file by executing the file.
Essentially random collection of helper functions, similar to GlobalFunctions.php.
Definition Utilities.php:31