Dump children or value(s).

@return array
544873
public function dump()
    {
        if ($this->hasChildren()) {
            $dump = [];
            foreach ($this->children as $child) {
                $dump[$child->getName()] = $child->dump();
            }
        } elseif (count($this->getValues()) === 1 && (!$this->hasTemplate() || !$this->getTemplate()->multiple_values)) {
            $dump = $this->values[0];
        } else {
            $dump = $this->values;
        }
        return $dump;
    }
1223766
public function dump($values) : string
    {
        if (! is_array($values))
            throw new DumpException($this, $values, self::ERROR);
        $items = [];
        $index = 0;
        try {
            foreach ($values as $key => $value) {
                $index = $key;
                $items[] = $this->syntax->dump($value);
            }
        } catch (DumpException $e) {
            throw new DumpException($this, $values, "Unable to dump item at key {$index}", [], $e);
        }

        return Text::join($items, $this->separator);
    }
63784
public function getDirtyAttributes()
    {
        $values = array();
        foreach (array_keys(get_object_vars($this)) as $key) {
            if (in_array($key, $this->_dirtyAttr)) {
                $values[$key] = $this->$key;
            } elseif ($this->$key instanceof ArrayObject) {
                foreach ($this->$key as $sub) {
                    if (($sub instanceof DirtyAware) && $sub->isDirty()) {
                        if (!array_key_exists($key, $values)) {
                            $values[$key] = new $this->$key;
                        }
                        $values[$key]->append($sub);
                    }
                }
            }
        }
        return $values;
    }
577681
public static function dump() {
         global $DEBUG_STRING;
         $retval = '';
         $sess = (strlen(session_id()) > 0 );
         if ( $sess ) {
             // echo("<br/>=== DUMP ====<br/>".$_SESSION['__zzz_debug']."<br/>\n");flush();
             if (strlen($_SESSION['__zzz_debug']) > 0) {
                 $retval = $_SESSION['__zzz_debug'];
                 unset($_SESSION['__zzz_debug']);
             }
         }
         if ( strlen($retval) > 0 && strlen($DEBUG_STRING) > 0) {
             $retval .= "\n";
         }
         if (strlen($DEBUG_STRING) > 0) {
             $retval .= $DEBUG_STRING;
             $DEBUG_STRING = '';
         }
         return $retval;
     }
1001670
public function dump()
	{
		if ($this->routesTree === null) {
			$this->routesTree = $this->parseRoutes($this->rawRoutes);
		}

		return $this->routesTree;
	}
162957
private function dumpFiles()
    {
        $files = [];

        foreach(File::allFiles(Config::dumpPath()) as $dumpFile) {
            $files[] = $dumpFile->getRealpath();
        }

        sort($files);

        return $files;
    }
741682
public function dataValue()
    {
        $result = null;
        if (is_array($this->value)) {
            $this->value = $this->arrayFilterEmptyRecursive($this->value);
            $result = (!empty($this->value)) ? Convert::array2json($this->value) : $result;
        } else {
            $result = parent::dataValue();
        }

        return $result;
    }
796370
public function dump()
    {
        foreach ($this->children as $child) {
            $this->logger->info(sprintf('[dizda-backup] Dumping %s database', $child->getName()));
            $child->dump();
        }
    }
1331818
public function get_children() {
        if (!$this->lf->is_directory()) {
            return array();
        }

        $result = array();
        $fs = get_file_storage();

        $storedfiles = $fs->get_directory_files($this->context->id, $this->lf->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid(),
                                                $this->lf->get_filepath(), false, true, "filepath, filename");
        foreach ($storedfiles as $file) {
            $result[] = new file_info_stored($this->browser, $this->context, $file, $this->urlbase, $this->topvisiblename,
                                             $this->itemidused, $this->readaccess, $this->writeaccess, false);
        }

        return $result;
    }
579521
public function toArrayWithoutEmptyValues()
    {
        $array = $this->removeEmptyValues($this->toArray(true));
        foreach ($array as $key => $value) {
            if ($value === \Parable\ORM\Database::NULL_VALUE) {
                $array[$key] = null;
            }
        }
        return $array;
    }
356957
public function dumpParameters()
    {
        $parameters = [];

        foreach ($this->parameters as $parameterName => $parameterValue) {
            $parameters[$parameterName] = [
                'value'      => $parameterValue
            ];
        }

        return $parameters;
    }
1343074
public function get_children() {
        if (!$this->lf->is_directory()) {
            return array();
        }

        $result = array();
        $fs = get_file_storage();

        $storedfiles = $fs->get_directory_files($this->context->id, 'course', 'legacy', 0, $this->lf->get_filepath(), false, true, "filepath ASC, filename ASC");
        foreach ($storedfiles as $file) {
            $result[] = new file_info_area_course_legacy($this->browser, $this->context, $file);
        }

        return $result;
    }
350983
public function dump()
    {
        if (empty($this->files)) {
            return;
        }

        $buffer = <<<'PHP'
<?php

$runonce = function(array $files, $delete = false) {
    foreach ($files as $file) {
        try {
            include $file;
        } catch (\Exception $e) {}

        $relpath = str_replace(TL_ROOT . DIRECTORY_SEPARATOR, '', $file);

        if ($delete && !unlink($file)) {
            throw new \Exception(
                'The file ' . $relpath . ' cannot be deleted. ' .
                'Please remove the file manually and correct the file permission settings on your server.'
            );
        }
    }
};

PHP;

        if (file_exists($this->targetFile)) {
            if (!is_writable($this->targetFile) || !is_file($this->targetFile)) {
                throw new \RuntimeException(
                    sprintf('Runonce file "%s" exists but is not writable.', $this->targetFile)
                );
            }

            $current = str_replace('.php', '_'.substr(md5(mt_rand()), 0, 8).'.php', $this->targetFile);
            $this->filesystem->rename($this->targetFile, $current);

            $buffer .= "\n\$runonce(array('" . $current . "'), true);\n";
        }

        $buffer .= "\n\$runonce(" . var_export(array_unique($this->files), true) . ");\n";

        $this->filesystem->ensureDirectoryExists(dirname($this->targetFile));

        if (false === file_put_contents($this->targetFile, $buffer)) {
            throw new \RuntimeException(sprintf('Could not write runonce file to "%s"', $this->targetFile));
        }

        $this->files = [];
    }
769329
protected function parseData()
    {
        $values = [];
        foreach ($this->parts['data'] as $key => $data) {
            foreach ($data as $value) {
                if (!is_array($value)) {
                    $value = [$value];
                }

                foreach ($value as $insertValue) {
                    $values[$key][] = $this->getManager()->getAdapter()->quote($insertValue);
                }
            }
        }
        foreach ($values as &$value) {
            $value = "(" . implode(", ", $value) . ")";
        }

        return ' VALUES ' . implode(', ', $values);
    }
297224
public function dump()
        {
            $objects = func_get_args();
            $content = "\n<pre>\n";

            foreach($objects as $object) {
                $content .= print_r($object, true);
            }

            return $content . "\n</pre>\n";
        }
41507
public function dump_links($links = null)
    {
        if ($links === null) {
            $links = $this->links;
        }
        $dump = array();
        foreach ($links as $key => $link) {
            if (isset($link['url'])) {
                $dump[$key] = $link['url'];
            }
            if ($key === '*') {
                $dump = array_merge($dump, $this->dump_links($link));
            } else if (isset($link['links'])) {
                $dump[$key] = $this->dump_links($link['links']);
            }
        }

        return $dump;
    }
909912
public function toArray()
    {
        return [
            'type'     => get_class($this),
            'value'    => $this->getValue(),
            'children' => array_map(function ($node) {
                return $node->jsonSerialize();
            }, $this->getChildren()),
        ];
    }