PHP 8.2.30
Preview: DataCollector.php Size: 1.29 KB
/opt/cloudlinux/alt-php54/root/usr/share/pear/Symfony/Component/HttpKernel/DataCollector/DataCollector.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpKernel\DataCollector;

use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;

/**
 * DataCollector.
 *
 * Children of this class must store the collected data in the data property.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Bernhard Schussek <bschussek@symfony.com>
 */
abstract class DataCollector implements DataCollectorInterface, \Serializable
{
    protected $data;

    /**
     * @var ValueExporter
     */
    private $valueExporter;

    public function serialize()
    {
        return serialize($this->data);
    }

    public function unserialize($data)
    {
        $this->data = unserialize($data);
    }

    /**
     * Converts a PHP variable to a string.
     *
     * @param mixed $var A PHP variable
     *
     * @return string The string representation of the variable
     */
    protected function varToString($var)
    {
        if (null === $this->valueExporter) {
            $this->valueExporter = new ValueExporter();
        }

        return $this->valueExporter->exportValue($var);
    }
}

Directory Contents

Dirs: 1 × Files: 11

Name Size Perms Modified Actions
Util DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
6.12 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
1.29 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
1.02 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
2.63 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
2.16 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
518 B lrw-r--r-- 2019-12-18 11:22:57
Edit Download
3.18 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
2.31 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
10.23 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
2.36 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download
3.15 KB lrw-r--r-- 2019-12-18 11:22:57
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).