1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,165 +0,0 @@ |
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 |
- * Get the current session ID. |
|
16 |
- * |
|
17 |
- * @return string |
|
18 |
- */ |
|
19 |
- public function getId(); |
|
20 |
- |
|
21 |
- /** |
|
22 |
- * Set the session ID. |
|
23 |
- * |
|
24 |
- * @param string $id |
|
25 |
- * @return void |
|
26 |
- */ |
|
27 |
- public function setId($id); |
|
28 |
- |
|
29 |
- /** |
|
30 |
- * Start the session, reading the data from a handler. |
|
31 |
- * |
|
32 |
- * @return bool |
|
33 |
- */ |
|
34 |
- public function start(); |
|
35 |
- |
|
36 |
- /** |
|
37 |
- * Save the session data to storage. |
|
38 |
- * |
|
39 |
- * @return void |
|
40 |
- */ |
|
41 |
- public function save(); |
|
42 |
- |
|
43 |
- /** |
|
44 |
- * Get all of the session data. |
|
45 |
- * |
|
46 |
- * @return array |
|
47 |
- */ |
|
48 |
- public function all(); |
|
49 |
- |
|
50 |
- /** |
|
51 |
- * Checks if a key exists. |
|
52 |
- * |
|
53 |
- * @param string|array $key |
|
54 |
- * @return bool |
|
55 |
- */ |
|
56 |
- public function exists($key); |
|
57 |
- |
|
58 |
- /** |
|
59 |
- * Checks if an a key is present and not null. |
|
60 |
- * |
|
61 |
- * @param string|array $key |
|
62 |
- * @return bool |
|
63 |
- */ |
|
64 |
- public function has($key); |
|
65 |
- |
|
66 |
- /** |
|
67 |
- * Get an item from the session. |
|
68 |
- * |
|
69 |
- * @param string $key |
|
70 |
- * @param mixed $default |
|
71 |
- * @return mixed |
|
72 |
- */ |
|
73 |
- public function get($key, $default = null); |
|
74 |
- |
|
75 |
- /** |
|
76 |
- * Put a key / value pair or array of key / value pairs in the session. |
|
77 |
- * |
|
78 |
- * @param string|array $key |
|
79 |
- * @param mixed $value |
|
80 |
- * @return void |
|
81 |
- */ |
|
82 |
- public function put($key, $value = null); |
|
83 |
- |
|
84 |
- /** |
|
85 |
- * Get the CSRF token value. |
|
86 |
- * |
|
87 |
- * @return string |
|
88 |
- */ |
|
89 |
- public function token(); |
|
90 |
- |
|
91 |
- /** |
|
92 |
- * Remove an item from the session, returning its value. |
|
93 |
- * |
|
94 |
- * @param string $key |
|
95 |
- * @return mixed |
|
96 |
- */ |
|
97 |
- public function remove($key); |
|
98 |
- |
|
99 |
- /** |
|
100 |
- * Remove one or many items from the session. |
|
101 |
- * |
|
102 |
- * @param string|array $keys |
|
103 |
- * @return void |
|
104 |
- */ |
|
105 |
- public function forget($keys); |
|
106 |
- |
|
107 |
- /** |
|
108 |
- * Remove all of the items from the session. |
|
109 |
- * |
|
110 |
- * @return void |
|
111 |
- */ |
|
112 |
- public function flush(); |
|
113 |
- |
|
114 |
- /** |
|
115 |
- * Generate a new session ID for the session. |
|
116 |
- * |
|
117 |
- * @param bool $destroy |
|
118 |
- * @return bool |
|
119 |
- */ |
|
120 |
- public function migrate($destroy = false); |
|
121 |
- |
|
122 |
- /** |
|
123 |
- * Determine if the session has been started. |
|
124 |
- * |
|
125 |
- * @return bool |
|
126 |
- */ |
|
127 |
- public function isStarted(); |
|
128 |
- |
|
129 |
- /** |
|
130 |
- * Get the previous URL from the session. |
|
131 |
- * |
|
132 |
- * @return string|null |
|
133 |
- */ |
|
134 |
- public function previousUrl(); |
|
135 |
- |
|
136 |
- /** |
|
137 |
- * Set the "previous" URL in the session. |
|
138 |
- * |
|
139 |
- * @param string $url |
|
140 |
- * @return void |
|
141 |
- */ |
|
142 |
- public function setPreviousUrl($url); |
|
143 |
- |
|
144 |
- /** |
|
145 |
- * Get the session handler instance. |
|
146 |
- * |
|
147 |
- * @return \SessionHandlerInterface |
|
148 |
- */ |
|
149 |
- public function getHandler(); |
|
150 |
- |
|
151 |
- /** |
|
152 |
- * Determine if the session handler needs a request. |
|
153 |
- * |
|
154 |
- * @return bool |
|
155 |
- */ |
|
156 |
- public function handlerNeedsRequest(); |
|
157 |
- |
|
158 |
- /** |
|
159 |
- * Set the request on the handler instance. |
|
160 |
- * |
|
161 |
- * @param \Illuminate\Http\Request $request |
|
162 |
- * @return void |
|
163 |
- */ |
|
164 |
- public function setRequestOnHandler($request); |
|
165 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,165 @@ |
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 |
+ * Get the current session ID. |
|
16 |
+ * |
|
17 |
+ * @return string |
|
18 |
+ */ |
|
19 |
+ public function getId(); |
|
20 |
+ |
|
21 |
+ /** |
|
22 |
+ * Set the session ID. |
|
23 |
+ * |
|
24 |
+ * @param string $id |
|
25 |
+ * @return void |
|
26 |
+ */ |
|
27 |
+ public function setId($id); |
|
28 |
+ |
|
29 |
+ /** |
|
30 |
+ * Start the session, reading the data from a handler. |
|
31 |
+ * |
|
32 |
+ * @return bool |
|
33 |
+ */ |
|
34 |
+ public function start(); |
|
35 |
+ |
|
36 |
+ /** |
|
37 |
+ * Save the session data to storage. |
|
38 |
+ * |
|
39 |
+ * @return void |
|
40 |
+ */ |
|
41 |
+ public function save(); |
|
42 |
+ |
|
43 |
+ /** |
|
44 |
+ * Get all of the session data. |
|
45 |
+ * |
|
46 |
+ * @return array |
|
47 |
+ */ |
|
48 |
+ public function all(); |
|
49 |
+ |
|
50 |
+ /** |
|
51 |
+ * Checks if a key exists. |
|
52 |
+ * |
|
53 |
+ * @param string|array $key |
|
54 |
+ * @return bool |
|
55 |
+ */ |
|
56 |
+ public function exists($key); |
|
57 |
+ |
|
58 |
+ /** |
|
59 |
+ * Checks if an a key is present and not null. |
|
60 |
+ * |
|
61 |
+ * @param string|array $key |
|
62 |
+ * @return bool |
|
63 |
+ */ |
|
64 |
+ public function has($key); |
|
65 |
+ |
|
66 |
+ /** |
|
67 |
+ * Get an item from the session. |
|
68 |
+ * |
|
69 |
+ * @param string $key |
|
70 |
+ * @param mixed $default |
|
71 |
+ * @return mixed |
|
72 |
+ */ |
|
73 |
+ public function get($key, $default = null); |
|
74 |
+ |
|
75 |
+ /** |
|
76 |
+ * Put a key / value pair or array of key / value pairs in the session. |
|
77 |
+ * |
|
78 |
+ * @param string|array $key |
|
79 |
+ * @param mixed $value |
|
80 |
+ * @return void |
|
81 |
+ */ |
|
82 |
+ public function put($key, $value = null); |
|
83 |
+ |
|
84 |
+ /** |
|
85 |
+ * Get the CSRF token value. |
|
86 |
+ * |
|
87 |
+ * @return string |
|
88 |
+ */ |
|
89 |
+ public function token(); |
|
90 |
+ |
|
91 |
+ /** |
|
92 |
+ * Remove an item from the session, returning its value. |
|
93 |
+ * |
|
94 |
+ * @param string $key |
|
95 |
+ * @return mixed |
|
96 |
+ */ |
|
97 |
+ public function remove($key); |
|
98 |
+ |
|
99 |
+ /** |
|
100 |
+ * Remove one or many items from the session. |
|
101 |
+ * |
|
102 |
+ * @param string|array $keys |
|
103 |
+ * @return void |
|
104 |
+ */ |
|
105 |
+ public function forget($keys); |
|
106 |
+ |
|
107 |
+ /** |
|
108 |
+ * Remove all of the items from the session. |
|
109 |
+ * |
|
110 |
+ * @return void |
|
111 |
+ */ |
|
112 |
+ public function flush(); |
|
113 |
+ |
|
114 |
+ /** |
|
115 |
+ * Generate a new session ID for the session. |
|
116 |
+ * |
|
117 |
+ * @param bool $destroy |
|
118 |
+ * @return bool |
|
119 |
+ */ |
|
120 |
+ public function migrate($destroy = false); |
|
121 |
+ |
|
122 |
+ /** |
|
123 |
+ * Determine if the session has been started. |
|
124 |
+ * |
|
125 |
+ * @return bool |
|
126 |
+ */ |
|
127 |
+ public function isStarted(); |
|
128 |
+ |
|
129 |
+ /** |
|
130 |
+ * Get the previous URL from the session. |
|
131 |
+ * |
|
132 |
+ * @return string|null |
|
133 |
+ */ |
|
134 |
+ public function previousUrl(); |
|
135 |
+ |
|
136 |
+ /** |
|
137 |
+ * Set the "previous" URL in the session. |
|
138 |
+ * |
|
139 |
+ * @param string $url |
|
140 |
+ * @return void |
|
141 |
+ */ |
|
142 |
+ public function setPreviousUrl($url); |
|
143 |
+ |
|
144 |
+ /** |
|
145 |
+ * Get the session handler instance. |
|
146 |
+ * |
|
147 |
+ * @return \SessionHandlerInterface |
|
148 |
+ */ |
|
149 |
+ public function getHandler(); |
|
150 |
+ |
|
151 |
+ /** |
|
152 |
+ * Determine if the session handler needs a request. |
|
153 |
+ * |
|
154 |
+ * @return bool |
|
155 |
+ */ |
|
156 |
+ public function handlerNeedsRequest(); |
|
157 |
+ |
|
158 |
+ /** |
|
159 |
+ * Set the request on the handler instance. |
|
160 |
+ * |
|
161 |
+ * @param \Illuminate\Http\Request $request |
|
162 |
+ * @return void |
|
163 |
+ */ |
|
164 |
+ public function setRequestOnHandler($request); |
|
165 |
+} |