This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php

37 lines
809 B
PHP
Raw Normal View History

<?php
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\HttpKernel\Profiler\Profiler;
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/**
* DataCollector.
*
* Children of this class must store the collected data in the data property.
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
*/
abstract class DataCollector implements DataCollectorInterface, \Serializable
{
protected $data;
public function serialize()
{
return serialize($this->data);
}
public function unserialize($data)
{
$this->data = unserialize($data);
}
}