Tale\Jade\Parser\Node::dump PHP Метод

dump() публичный Метод

This is also the default-action for __toString on every node The result will look like this: [element tag=a expands=[element tag=b]] [element tag=c attributes={[attribute name=d name=e]}]
public dump ( integer $level ) : string
$level integer the initial indentation level
Результат string the string to debug the node-tree
    public function dump($level = 0)
    {
        $export = implode(' ', array_map(function ($key, $value) {
            $str = '';
            if (!is_numeric($key)) {
                $str .= "{$key}=";
            }
            if ($value) {
                $str .= !is_array($value) ? $value : '{' . implode(', ', array_map('trim', array_map('strval', $value))) . '}';
            }
            return $str;
        }, array_keys($this->data), $this->data));
        $indent = str_repeat('    ', $level);
        $str = $indent . '[' . $this->type . (empty($export) ? '' : " {$export}") . ']' . "\n";
        foreach ($this->children as $child) {
            $str .= $child->dump($level + 1);
        }
        return trim($str);
    }