Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
PHPVariableLoader.php
1<?php
2declare( strict_types = 1 );
3
5
20 public static function loadVariableFromPHPFile( string $_filename, string $_variable ) {
21 if ( !file_exists( $_filename ) ) {
22 return null;
23 } else {
24 require $_filename;
25
26 return $$_variable ?? null;
27 }
28 }
29}
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:29