Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.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 * | 17 * |
18 * @author Drak <drak@zikula.org> | 18 * @author Drak <drak@zikula.org> |
19 */ | 19 */ |
20 class NamespacedAttributeBag extends AttributeBag | 20 class NamespacedAttributeBag extends AttributeBag |
21 { | 21 { |
22 /** | |
23 * Namespace character. | |
24 * | |
25 * @var string | |
26 */ | |
27 private $namespaceCharacter; | 22 private $namespaceCharacter; |
28 | 23 |
29 /** | 24 /** |
30 * Constructor. | |
31 * | |
32 * @param string $storageKey Session storage key | 25 * @param string $storageKey Session storage key |
33 * @param string $namespaceCharacter Namespace character to use in keys | 26 * @param string $namespaceCharacter Namespace character to use in keys |
34 */ | 27 */ |
35 public function __construct($storageKey = '_sf2_attributes', $namespaceCharacter = '/') | 28 public function __construct($storageKey = '_sf2_attributes', $namespaceCharacter = '/') |
36 { | 29 { |
107 * @return array | 100 * @return array |
108 */ | 101 */ |
109 protected function &resolveAttributePath($name, $writeContext = false) | 102 protected function &resolveAttributePath($name, $writeContext = false) |
110 { | 103 { |
111 $array = &$this->attributes; | 104 $array = &$this->attributes; |
112 $name = (strpos($name, $this->namespaceCharacter) === 0) ? substr($name, 1) : $name; | 105 $name = (0 === strpos($name, $this->namespaceCharacter)) ? substr($name, 1) : $name; |
113 | 106 |
114 // Check if there is anything to do, else return | 107 // Check if there is anything to do, else return |
115 if (!$name) { | 108 if (!$name) { |
116 return $array; | 109 return $array; |
117 } | 110 } |