Class PHPArrayDumper

Description
Method Summary
void arrayToPHPFileWithArray ( $array,  $varName,  $filePath)
string arrayToPHPSource (array $array, [ $indent = 0])
string arrayToPHPVariableSource (array $array,  $varName)
Methods
arrayToPHPFileWithArray (line 71)
void arrayToPHPFileWithArray ( $array,  $varName,  $filePath)
  • $array
  • $varName
  • $filePath
arrayToPHPSource (line 16)

Given a PHP array, output a string which, when eval'd, reproduces the array.

Recursive algorithm. Doens't support objects or resources.

  • return: PHP code for the array in format "array(...);".
  • throws: Exception if an unsupported type is encountered.
string arrayToPHPSource (array $array, [ $indent = 0])
  • array $array: The array to dump.
  • $indent
arrayToPHPVariableSource (line 66)

Similar to arrayToPHPSource but gives results in "$myVarName = array(...);" format.

  • return: PHP code for the array in format "$myVarName = array(...);".
  • throws: Exception if an unsupported type is encountered.
string arrayToPHPVariableSource (array $array,  $varName)
  • array $array: The array to dump.
  • $varName

Documentation generated on Thu, 14 May 2009 16:19:41 -0400 by phpDocumentor 1.4.2