annotate vendor/symfony/var-dumper/Cloner/Stub.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children a9cd425dd02b
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 /*
Chris@0 4 * This file is part of the Symfony package.
Chris@0 5 *
Chris@0 6 * (c) Fabien Potencier <fabien@symfony.com>
Chris@0 7 *
Chris@0 8 * For the full copyright and license information, please view the LICENSE
Chris@0 9 * file that was distributed with this source code.
Chris@0 10 */
Chris@0 11
Chris@0 12 namespace Symfony\Component\VarDumper\Cloner;
Chris@0 13
Chris@0 14 /**
Chris@0 15 * Represents the main properties of a PHP variable.
Chris@0 16 *
Chris@0 17 * @author Nicolas Grekas <p@tchwork.com>
Chris@0 18 */
Chris@0 19 class Stub implements \Serializable
Chris@0 20 {
Chris@0 21 const TYPE_REF = 1;
Chris@0 22 const TYPE_STRING = 2;
Chris@0 23 const TYPE_ARRAY = 3;
Chris@0 24 const TYPE_OBJECT = 4;
Chris@0 25 const TYPE_RESOURCE = 5;
Chris@0 26
Chris@0 27 const STRING_BINARY = 1;
Chris@0 28 const STRING_UTF8 = 2;
Chris@0 29
Chris@0 30 const ARRAY_ASSOC = 1;
Chris@0 31 const ARRAY_INDEXED = 2;
Chris@0 32
Chris@0 33 public $type = self::TYPE_REF;
Chris@0 34 public $class = '';
Chris@0 35 public $value;
Chris@0 36 public $cut = 0;
Chris@0 37 public $handle = 0;
Chris@0 38 public $refCount = 0;
Chris@0 39 public $position = 0;
Chris@0 40 public $attr = array();
Chris@0 41
Chris@0 42 /**
Chris@0 43 * @internal
Chris@0 44 */
Chris@0 45 public function serialize()
Chris@0 46 {
Chris@0 47 return \serialize(array($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr));
Chris@0 48 }
Chris@0 49
Chris@0 50 /**
Chris@0 51 * @internal
Chris@0 52 */
Chris@0 53 public function unserialize($serialized)
Chris@0 54 {
Chris@0 55 list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = \unserialize($serialized);
Chris@0 56 }
Chris@0 57 }