MediaWiki REL1_41
|
Format a static PHP array to be written to a file. More...
Public Member Functions | |
create (array $data, $header='Automatically generated') | |
Static Public Member Functions | |
static | encodeValue ( $value, $indent=0) |
Recursively turn one value into properly-indented PHP. | |
static | write (array $data, $header) |
Create a PHP file that returns the array. | |
static | writeClass (array $data, array $layout) |
Create an PHP class file with the array as a class constant. | |
Format a static PHP array to be written to a file.
Definition at line 27 of file StaticArrayWriter.php.
Wikimedia\StaticArrayWriter::create | ( | array | $data, |
$header = 'Automatically generated' ) |
array | $data | Array with keys/values to export |
string | $header |
Definition at line 33 of file StaticArrayWriter.php.
References $header.
|
static |
Recursively turn one value into properly-indented PHP.
mixed | $value | |
int | $indent | Indentation level |
Definition at line 110 of file StaticArrayWriter.php.
|
static |
Create a PHP file that returns the array.
array | $data | Array with keys/values to export |
string | $header |
Definition at line 45 of file StaticArrayWriter.php.
References $header.
|
static |
Create an PHP class file with the array as a class constant.
PHP classes can be autoloaded by name, which allows usage to be decoupled from the file path.
array | $data | |
array{header:string,namespace:string,class:string,const:string} | $layout |
Definition at line 67 of file StaticArrayWriter.php.