MediaWiki REL1_34
Wikimedia\StaticArrayWriter Class Reference

Format a static PHP array to be written to a file. More...

Public Member Functions

 create (array $data, $header='Automatically generated')
 

Private Member Functions

 encode ( $key, $value, $indent)
 Recursively turn one k/v pair into properly-indented PHP.
 

Detailed Description

Format a static PHP array to be written to a file.

Since
1.32

Definition at line 26 of file StaticArrayWriter.php.

Member Function Documentation

◆ create()

Wikimedia\StaticArrayWriter::create ( array $data,
$header = 'Automatically generated' )
Parameters
array$dataArray with keys/values to export
string$header
Returns
string PHP code

Definition at line 34 of file StaticArrayWriter.php.

References $header.

◆ encode()

Wikimedia\StaticArrayWriter::encode ( $key,
$value,
$indent )
private

Recursively turn one k/v pair into properly-indented PHP.

Parameters
string | int$key
array | mixed$value
int$indentIndentation level
Returns
string

Definition at line 54 of file StaticArrayWriter.php.

References $line.


The documentation for this class was generated from the following file: