comparison 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
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
14 /** 14 /**
15 * Represents the main properties of a PHP variable. 15 * Represents the main properties of a PHP variable.
16 * 16 *
17 * @author Nicolas Grekas <p@tchwork.com> 17 * @author Nicolas Grekas <p@tchwork.com>
18 */ 18 */
19 class Stub implements \Serializable 19 class Stub
20 { 20 {
21 const TYPE_REF = 1; 21 const TYPE_REF = 1;
22 const TYPE_STRING = 2; 22 const TYPE_STRING = 2;
23 const TYPE_ARRAY = 3; 23 const TYPE_ARRAY = 3;
24 const TYPE_OBJECT = 4; 24 const TYPE_OBJECT = 4;
35 public $value; 35 public $value;
36 public $cut = 0; 36 public $cut = 0;
37 public $handle = 0; 37 public $handle = 0;
38 public $refCount = 0; 38 public $refCount = 0;
39 public $position = 0; 39 public $position = 0;
40 public $attr = array(); 40 public $attr = [];
41 41
42 /** 42 /**
43 * @internal 43 * @internal
44 */ 44 */
45 public function serialize() 45 public function __sleep()
46 { 46 {
47 return \serialize(array($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr)); 47 $this->serialized = [$this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr];
48
49 return ['serialized'];
48 } 50 }
49 51
50 /** 52 /**
51 * @internal 53 * @internal
52 */ 54 */
53 public function unserialize($serialized) 55 public function __wakeup()
54 { 56 {
55 list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = \unserialize($serialized); 57 list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = $this->serialized;
58 unset($this->serialized);
56 } 59 }
57 } 60 }