Translate extension for MediaWiki
Loading...
Searching...
No Matches
PHPVariableLoader.php
1
<?php
2
declare( strict_types = 1 );
3
4
namespace
MediaWiki\Extension\Translate\Utilities
;
5
14
class
PHPVariableLoader
{
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
}
MediaWiki\Extension\Translate\Utilities\PHPVariableLoader
Stuff for handling configuration files in PHP format.
Definition
PHPVariableLoader.php:14
MediaWiki\Extension\Translate\Utilities\PHPVariableLoader\loadVariableFromPHPFile
static loadVariableFromPHPFile(string $_filename, string $_variable)
Returns a global variable from PHP file by executing the file.
Definition
PHPVariableLoader.php:21
MediaWiki\Extension\Translate\Utilities\Utilities
Essentially random collection of helper functions, similar to GlobalFunctions.php.
Definition
Utilities.php:31
src
Utilities
PHPVariableLoader.php
Generated by
1.10.0