Debian Codegraph @

lib/3rdParty/composer/illuminate/contracts/Session/Session.php

raw symbols SCIP
1 <?php
2
3 namespace Illuminate\Contracts\Session;
4
5 interface Session
6 {
7 /**
8 * Get the name of the session.
9 *
10 * @return string
11 */
12 public function getName();
13
14 /**
15 * Set the name of the session.
16 *
17 * @param string $name
18 * @return void
19 */
20 public function setName($name);
21
22 /**
23 * Get the current session ID.
24 *
25 * @return string
26 */
27 public function getId();
28
29 /**
30 * Set the session ID.
31 *
32 * @param string $id
33 * @return void
34 */
35 public function setId($id);
36
37 /**
38 * Start the session, reading the data from a handler.
39 *
40 * @return bool
41 */
42 public function start();
43
44 /**
45 * Save the session data to storage.
46 *
47 * @return void
48 */
49 public function save();
50
51 /**
52 * Get all of the session data.
53 *
54 * @return array
55 */
56 public function all();
57
58 /**
59 * Checks if a key exists.
60 *
61 * @param string|array $key
62 * @return bool
63 */
64 public function exists($key);
65
66 /**
67 * Checks if a key is present and not null.
68 *
69 * @param string|array $key
70 * @return bool
71 */
72 public function has($key);
73
74 /**
75 * Get an item from the session.
76 *
77 * @param string $key
78 * @param mixed $default
79 * @return mixed
80 */
81 public function get($key, $default = null);
82
83 /**
84 * Get the value of a given key and then forget it.
85 *
86 * @param string $key
87 * @param mixed $default
88 * @return mixed
89 */
90 public function pull($key, $default = null);
91
92 /**
93 * Put a key / value pair or array of key / value pairs in the session.
94 *
95 * @param string|array $key
96 * @param mixed $value
97 * @return void
98 */
99 public function put($key, $value = null);
100
101 /**
102 * Flash a key / value pair to the session.
103 *
104 * @param string $key
105 * @param mixed $value
106 * @return void
107 */
108 public function flash(string $key, $value = true);
109
110 /**
111 * Get the CSRF token value.
112 *
113 * @return string
114 */
115 public function token();
116
117 /**
118 * Regenerate the CSRF token value.
119 *
120 * @return void
121 */
122 public function regenerateToken();
123
124 /**
125 * Remove an item from the session, returning its value.
126 *
127 * @param string $key
128 * @return mixed
129 */
130 public function remove($key);
131
132 /**
133 * Remove one or many items from the session.
134 *
135 * @param string|array $keys
136 * @return void
137 */
138 public function forget($keys);
139
140 /**
141 * Remove all of the items from the session.
142 *
143 * @return void
144 */
145 public function flush();
146
147 /**
148 * Flush the session data and regenerate the ID.
149 *
150 * @return bool
151 */
152 public function invalidate();
153
154 /**
155 * Generate a new session identifier.
156 *
157 * @param bool $destroy
158 * @return bool
159 */
160 public function regenerate($destroy = false);
161
162 /**
163 * Generate a new session ID for the session.
164 *
165 * @param bool $destroy
166 * @return bool
167 */
168 public function migrate($destroy = false);
169
170 /**
171 * Determine if the session has been started.
172 *
173 * @return bool
174 */
175 public function isStarted();
176
177 /**
178 * Get the previous URL from the session.
179 *
180 * @return string|null
181 */
182 public function previousUrl();
183
184 /**
185 * Set the "previous" URL in the session.
186 *
187 * @param string $url
188 * @return void
189 */
190 public function setPreviousUrl($url);
191
192 /**
193 * Get the session handler instance.
194 *
195 * @return \SessionHandlerInterface
196 */
197 public function getHandler();
198
199 /**
200 * Determine if the session handler needs a request.
201 *
202 * @return bool
203 */
204 public function handlerNeedsRequest();
205
206 /**
207 * Set the request on the handler instance.
208 *
209 * @param \Illuminate\Http\Request $request
210 * @return void
211 */
212 public function setRequestOnHandler($request);
213 }