Neos\Flow\Error\Debugger::renderArrayDump PHP Метод

renderArrayDump() защищенный статический Метод

Renders a dump of the given array
protected static renderArrayDump ( array $array, integer $level, boolean $plaintext = false, boolean $ansiColors = false ) : string
$array array
$level integer
$plaintext boolean
$ansiColors boolean
Результат string
    protected static function renderArrayDump($array, $level, $plaintext = false, $ansiColors = false)
    {
        $type = is_array($array) ? 'array' : get_class($array);
        $dump = $type . (count($array) ? '(' . count($array) . ')' : '(empty)');
        foreach ($array as $key => $value) {
            $dump .= chr(10) . str_repeat(' ', $level) . self::renderDump($key, 0, $plaintext, $ansiColors) . ' => ';
            $dump .= self::renderDump($value, $level + 1, $plaintext, $ansiColors);
        }
        return $dump;
    }