annotate vendor/symfony/var-dumper/Cloner/Stub.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children 12f9dff5fda9
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@4 19 class Stub
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@4 40 public $attr = [];
Chris@0 41
Chris@0 42 /**
Chris@0 43 * @internal
Chris@0 44 */
Chris@4 45 public function __sleep()
Chris@0 46 {
Chris@4 47 $this->serialized = [$this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr];
Chris@4 48
Chris@4 49 return ['serialized'];
Chris@0 50 }
Chris@0 51
Chris@0 52 /**
Chris@0 53 * @internal
Chris@0 54 */
Chris@4 55 public function __wakeup()
Chris@0 56 {
Chris@4 57 list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = $this->serialized;
Chris@4 58 unset($this->serialized);
Chris@0 59 }
Chris@0 60 }