| @@ 34-41 (lines=8) @@ | ||
| 31 | * |
|
| 32 | * @return bool |
|
| 33 | */ |
|
| 34 | public function has(Request $request, string $key): bool |
|
| 35 | { |
|
| 36 | $exists = $this->getSession($request)->has($key); |
|
| 37 | ||
| 38 | $this->logger->info('session: has key {key}, exists {exists}', ['key' => $key, 'exists' => $exists]); |
|
| 39 | ||
| 40 | return $exists; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param Request $request |
|
| @@ 49-56 (lines=8) @@ | ||
| 46 | * |
|
| 47 | * @return mixed |
|
| 48 | */ |
|
| 49 | public function get(Request $request, string $key) |
|
| 50 | { |
|
| 51 | $value = json_decode((string) $this->getSession($request)->get($key), true); |
|
| 52 | ||
| 53 | $this->logger->info('session: get key {key}, exists {exists}', ['key' => $key, 'exists' => (bool) $value]); |
|
| 54 | ||
| 55 | return $value; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * @param Request $request |
|