Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.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 |
---|---|
17 * @author Drak <drak@zikula.org> | 17 * @author Drak <drak@zikula.org> |
18 */ | 18 */ |
19 class AutoExpireFlashBag implements FlashBagInterface | 19 class AutoExpireFlashBag implements FlashBagInterface |
20 { | 20 { |
21 private $name = 'flashes'; | 21 private $name = 'flashes'; |
22 | |
23 /** | |
24 * Flash messages. | |
25 * | |
26 * @var array | |
27 */ | |
28 private $flashes = array('display' => array(), 'new' => array()); | 22 private $flashes = array('display' => array(), 'new' => array()); |
29 | |
30 /** | |
31 * The storage key for flashes in the session. | |
32 * | |
33 * @var string | |
34 */ | |
35 private $storageKey; | 23 private $storageKey; |
36 | 24 |
37 /** | 25 /** |
38 * Constructor. | |
39 * | |
40 * @param string $storageKey The key used to store flashes in the session | 26 * @param string $storageKey The key used to store flashes in the session |
41 */ | 27 */ |
42 public function __construct($storageKey = '_sf2_flashes') | 28 public function __construct($storageKey = '_symfony_flashes') |
43 { | 29 { |
44 $this->storageKey = $storageKey; | 30 $this->storageKey = $storageKey; |
45 } | 31 } |
46 | 32 |
47 /** | 33 /** |
118 * {@inheritdoc} | 104 * {@inheritdoc} |
119 */ | 105 */ |
120 public function all() | 106 public function all() |
121 { | 107 { |
122 $return = $this->flashes['display']; | 108 $return = $this->flashes['display']; |
123 $this->flashes = array('new' => array(), 'display' => array()); | 109 $this->flashes['display'] = array(); |
124 | 110 |
125 return $return; | 111 return $return; |
126 } | 112 } |
127 | 113 |
128 /** | 114 /** |