comparison vendor/symfony/var-dumper/Caster/DoctrineCaster.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
24 class DoctrineCaster 24 class DoctrineCaster
25 { 25 {
26 public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, $isNested) 26 public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, $isNested)
27 { 27 {
28 foreach (['__cloner__', '__initializer__'] as $k) { 28 foreach (['__cloner__', '__initializer__'] as $k) {
29 if (array_key_exists($k, $a)) { 29 if (\array_key_exists($k, $a)) {
30 unset($a[$k]); 30 unset($a[$k]);
31 ++$stub->cut; 31 ++$stub->cut;
32 } 32 }
33 } 33 }
34 34
36 } 36 }
37 37
38 public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, $isNested) 38 public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, $isNested)
39 { 39 {
40 foreach (['_entityPersister', '_identifier'] as $k) { 40 foreach (['_entityPersister', '_identifier'] as $k) {
41 if (array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { 41 if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) {
42 unset($a[$k]); 42 unset($a[$k]);
43 ++$stub->cut; 43 ++$stub->cut;
44 } 44 }
45 } 45 }
46 46
48 } 48 }
49 49
50 public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, $isNested) 50 public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, $isNested)
51 { 51 {
52 foreach (['snapshot', 'association', 'typeClass'] as $k) { 52 foreach (['snapshot', 'association', 'typeClass'] as $k) {
53 if (array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { 53 if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) {
54 $a[$k] = new CutStub($a[$k]); 54 $a[$k] = new CutStub($a[$k]);
55 } 55 }
56 } 56 }
57 57
58 return $a; 58 return $a;