4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\VarDumper\Cloner;
15 * Represents the main properties of a PHP variable.
17 * @author Nicolas Grekas <p@tchwork.com>
19 class Stub implements \Serializable
22 const TYPE_STRING = 2;
24 const TYPE_OBJECT = 4;
25 const TYPE_RESOURCE = 5;
27 const STRING_BINARY = 1;
28 const STRING_UTF8 = 2;
30 const ARRAY_ASSOC = 1;
31 const ARRAY_INDEXED = 2;
33 public $type = self::TYPE_REF;
40 public $attr = array();
45 public function serialize()
47 return \serialize(array($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr));
53 public function unserialize($serialized)
55 list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = \unserialize($serialized);