1 | <?php |
||
28 | class Values implements Map |
||
29 | { |
||
30 | /** |
||
31 | * @var Session |
||
32 | */ |
||
33 | protected $session; |
||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $name; |
||
38 | |||
39 | /** |
||
40 | * Creates a new Session value namespace. |
||
41 | * |
||
42 | * @param \Caridea\Session\Session $session The session utility |
||
43 | * @param string $name The session value namespace |
||
44 | */ |
||
45 | 8 | public function __construct(Session $session, string $name) |
|
53 | |||
54 | /** |
||
55 | * {@inheritDoc} |
||
56 | */ |
||
57 | 1 | public function clear(): void |
|
63 | |||
64 | /** |
||
65 | * {@inheritDoc} |
||
66 | */ |
||
67 | 2 | public function count(): int |
|
72 | |||
73 | /** |
||
74 | * {@inheritDoc} |
||
75 | */ |
||
76 | 1 | public function get(string $offset, $alt = null) |
|
82 | |||
83 | /** |
||
84 | * {@inheritDoc} |
||
85 | */ |
||
86 | 1 | public function getIterator(): \Iterator |
|
91 | |||
92 | /** |
||
93 | * Gets the values namespace in the session. |
||
94 | * |
||
95 | * @return string The values namespace |
||
96 | */ |
||
97 | 1 | public function getNamespace(): string |
|
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | 1 | public function merge(\Caridea\Session\Map $values): void |
|
117 | |||
118 | /** |
||
119 | * {@inheritDoc} |
||
120 | */ |
||
121 | 1 | public function offsetExists($offset): bool |
|
126 | |||
127 | /** |
||
128 | * {@inheritDoc} |
||
129 | */ |
||
130 | 1 | public function offsetGet($offset) |
|
135 | |||
136 | /** |
||
137 | * {@inheritDoc} |
||
138 | */ |
||
139 | 3 | public function offsetSet($offset, $value) |
|
144 | |||
145 | /** |
||
146 | * {@inheritDoc} |
||
147 | */ |
||
148 | 1 | public function offsetUnset($offset) |
|
154 | |||
155 | /** |
||
156 | * Resumes the session. |
||
157 | * |
||
158 | * @return bool Whether the session resumed successfully |
||
159 | */ |
||
160 | 2 | protected function resume(): bool |
|
164 | |||
165 | /** |
||
166 | * Starts the session, trying to resume it first. |
||
167 | * |
||
168 | * @return bool Whether the session started successfully |
||
169 | */ |
||
170 | 1 | protected function start(): bool |
|
174 | |||
175 | /** |
||
176 | * Initializes the session. |
||
177 | * |
||
178 | * @return bool Always `true` |
||
179 | */ |
||
180 | 1 | protected function init(): bool |
|
187 | } |
||
188 |