comparison vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.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
61 * @var array|SessionBagInterface[] 61 * @var array|SessionBagInterface[]
62 */ 62 */
63 protected $bags = array(); 63 protected $bags = array();
64 64
65 /** 65 /**
66 * Constructor.
67 *
68 * @param string $name Session name 66 * @param string $name Session name
69 * @param MetadataBag $metaBag MetadataBag instance 67 * @param MetadataBag $metaBag MetadataBag instance
70 */ 68 */
71 public function __construct($name = 'MOCKSESSID', MetadataBag $metaBag = null) 69 public function __construct($name = 'MOCKSESSID', MetadataBag $metaBag = null)
72 { 70 {
73 $this->name = $name; 71 $this->name = $name;
74 $this->setMetadataBag($metaBag); 72 $this->setMetadataBag($metaBag);
75 } 73 }
76 74
77 /**
78 * Sets the session data.
79 *
80 * @param array $array
81 */
82 public function setSessionData(array $array) 75 public function setSessionData(array $array)
83 { 76 {
84 $this->data = $array; 77 $this->data = $array;
85 } 78 }
86 79
213 public function isStarted() 206 public function isStarted()
214 { 207 {
215 return $this->started; 208 return $this->started;
216 } 209 }
217 210
218 /**
219 * Sets the MetadataBag.
220 *
221 * @param MetadataBag $bag
222 */
223 public function setMetadataBag(MetadataBag $bag = null) 211 public function setMetadataBag(MetadataBag $bag = null)
224 { 212 {
225 if (null === $bag) { 213 if (null === $bag) {
226 $bag = new MetadataBag(); 214 $bag = new MetadataBag();
227 } 215 }