Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-kernel/Config/EnvParametersResource.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
15 | 15 |
16 /** | 16 /** |
17 * EnvParametersResource represents resources stored in prefixed environment variables. | 17 * EnvParametersResource represents resources stored in prefixed environment variables. |
18 * | 18 * |
19 * @author Chris Wilkinson <chriswilkinson84@gmail.com> | 19 * @author Chris Wilkinson <chriswilkinson84@gmail.com> |
20 * | |
21 * @deprecated since version 3.4, to be removed in 4.0 | |
20 */ | 22 */ |
21 class EnvParametersResource implements SelfCheckingResourceInterface, \Serializable | 23 class EnvParametersResource implements SelfCheckingResourceInterface, \Serializable |
22 { | 24 { |
23 /** | 25 /** |
24 * @var string | 26 * @var string |
29 * @var string | 31 * @var string |
30 */ | 32 */ |
31 private $variables; | 33 private $variables; |
32 | 34 |
33 /** | 35 /** |
34 * Constructor. | |
35 * | |
36 * @param string $prefix | 36 * @param string $prefix |
37 */ | 37 */ |
38 public function __construct($prefix) | 38 public function __construct($prefix) |
39 { | 39 { |
40 $this->prefix = $prefix; | 40 $this->prefix = $prefix; |
70 return serialize(array('prefix' => $this->prefix, 'variables' => $this->variables)); | 70 return serialize(array('prefix' => $this->prefix, 'variables' => $this->variables)); |
71 } | 71 } |
72 | 72 |
73 public function unserialize($serialized) | 73 public function unserialize($serialized) |
74 { | 74 { |
75 $unserialized = unserialize($serialized); | 75 if (\PHP_VERSION_ID >= 70000) { |
76 $unserialized = unserialize($serialized, array('allowed_classes' => false)); | |
77 } else { | |
78 $unserialized = unserialize($serialized); | |
79 } | |
76 | 80 |
77 $this->prefix = $unserialized['prefix']; | 81 $this->prefix = $unserialized['prefix']; |
78 $this->variables = $unserialized['variables']; | 82 $this->variables = $unserialized['variables']; |
79 } | 83 } |
80 | 84 |