Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Config/ContainerParametersResource.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 | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | |
2 | |
3 /* | |
4 * This file is part of the Symfony package. | |
5 * | |
6 * (c) Fabien Potencier <fabien@symfony.com> | |
7 * | |
8 * For the full copyright and license information, please view the LICENSE | |
9 * file that was distributed with this source code. | |
10 */ | |
11 | |
12 namespace Symfony\Component\DependencyInjection\Config; | |
13 | |
14 use Symfony\Component\Config\Resource\ResourceInterface; | |
15 | |
16 /** | |
17 * Tracks container parameters. | |
18 * | |
19 * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> | |
20 */ | |
21 class ContainerParametersResource implements ResourceInterface, \Serializable | |
22 { | |
23 private $parameters; | |
24 | |
25 /** | |
26 * @param array $parameters The container parameters to track | |
27 */ | |
28 public function __construct(array $parameters) | |
29 { | |
30 $this->parameters = $parameters; | |
31 } | |
32 | |
33 /** | |
34 * {@inheritdoc} | |
35 */ | |
36 public function __toString() | |
37 { | |
38 return 'container_parameters_'.md5(serialize($this->parameters)); | |
39 } | |
40 | |
41 /** | |
42 * {@inheritdoc} | |
43 */ | |
44 public function serialize() | |
45 { | |
46 return serialize($this->parameters); | |
47 } | |
48 | |
49 /** | |
50 * {@inheritdoc} | |
51 */ | |
52 public function unserialize($serialized) | |
53 { | |
54 $this->parameters = unserialize($serialized); | |
55 } | |
56 | |
57 /** | |
58 * @return array Tracked parameters | |
59 */ | |
60 public function getParameters() | |
61 { | |
62 return $this->parameters; | |
63 } | |
64 } |