classSession.html
13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!-- HTML header for doxygen 1.8.5-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Fat-Free Framework: Session Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Fat-Free Framework
 <span id="projectnumber">3.2.2</span>
 <span class="menu"><a href="index.html">Overview</a> <a href="annotated.html">Class List</a> <a href="hierarchy.html">Hierarchy</a></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="classSession-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Session Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Cache-based session handler.
<a href="classSession.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad2d5e0e045bc7a840a3fe81d74720e71"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#ad2d5e0e045bc7a840a3fe81d74720e71">open</a> ($path, $name)</td></tr>
<tr class="separator:ad2d5e0e045bc7a840a3fe81d74720e71"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a36e9b941b6944020000d5e28d7f390f8"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a36e9b941b6944020000d5e28d7f390f8">close</a> ()</td></tr>
<tr class="separator:a36e9b941b6944020000d5e28d7f390f8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3a45d45b017b282e438f91c113905442"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a3a45d45b017b282e438f91c113905442">read</a> ($id)</td></tr>
<tr class="separator:a3a45d45b017b282e438f91c113905442"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5ee8f519be2a3018d95f031514ffd4bb"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a5ee8f519be2a3018d95f031514ffd4bb">write</a> ($id, $data)</td></tr>
<tr class="separator:a5ee8f519be2a3018d95f031514ffd4bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a330c28fa28c94f5a64b912b2cab5d1c8"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a330c28fa28c94f5a64b912b2cab5d1c8">destroy</a> ($id)</td></tr>
<tr class="separator:a330c28fa28c94f5a64b912b2cab5d1c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad837635002a0bc1bef56208c940154a7"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#ad837635002a0bc1bef56208c940154a7">cleanup</a> ($max)</td></tr>
<tr class="separator:ad837635002a0bc1bef56208c940154a7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a618050c97f93c7e4a77c6c731cd0bf23"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a618050c97f93c7e4a77c6c731cd0bf23">csrf</a> ()</td></tr>
<tr class="separator:a618050c97f93c7e4a77c6c731cd0bf23"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5a446bd12a9bdda3237930bcaa109fb2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a5a446bd12a9bdda3237930bcaa109fb2">ip</a> ()</td></tr>
<tr class="separator:a5a446bd12a9bdda3237930bcaa109fb2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7f3be5dc562f7924df61113b30f07f17"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a7f3be5dc562f7924df61113b30f07f17">stamp</a> ()</td></tr>
<tr class="separator:a7f3be5dc562f7924df61113b30f07f17"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac6807a612c0fc952cb52fbb80eb488f0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#ac6807a612c0fc952cb52fbb80eb488f0">agent</a> ()</td></tr>
<tr class="separator:ac6807a612c0fc952cb52fbb80eb488f0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a36373ba15d6c8f932aeea02d7320d7c8"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a36373ba15d6c8f932aeea02d7320d7c8">__construct</a> ()</td></tr>
<tr class="separator:a36373ba15d6c8f932aeea02d7320d7c8"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a5f527ade4d348c3c809712715018ae1a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f527ade4d348c3c809712715018ae1a"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a5f527ade4d348c3c809712715018ae1a">$sid</a></td></tr>
<tr class="memdesc:a5f527ade4d348c3c809712715018ae1a"><td class="mdescLeft"> </td><td class="mdescRight">Session ID. <br/></td></tr>
<tr class="separator:a5f527ade4d348c3c809712715018ae1a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Cache-based session handler. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a36373ba15d6c8f932aeea02d7320d7c8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::__construct </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Instantiate class </p>
<dl class="section return"><dt>Returns</dt><dd>object </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac6807a612c0fc952cb52fbb80eb488f0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::agent </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return HTTP user agent </p>
<dl class="section return"><dt>Returns</dt><dd>string|FALSE </dd></dl>
</div>
</div>
<a class="anchor" id="ad837635002a0bc1bef56208c940154a7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::cleanup </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>$max</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Garbage collector </p>
<dl class="section return"><dt>Returns</dt><dd>TRUE </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">$max</td><td>int </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a36e9b941b6944020000d5e28d7f390f8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::close </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Close session </p>
<dl class="section return"><dt>Returns</dt><dd>TRUE </dd></dl>
</div>
</div>
<a class="anchor" id="a618050c97f93c7e4a77c6c731cd0bf23"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::csrf </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return anti-CSRF token </p>
<dl class="section return"><dt>Returns</dt><dd>string|FALSE </dd></dl>
</div>
</div>
<a class="anchor" id="a330c28fa28c94f5a64b912b2cab5d1c8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::destroy </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>$id</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy session </p>
<dl class="section return"><dt>Returns</dt><dd>TRUE </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">$id</td><td>string </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a5a446bd12a9bdda3237930bcaa109fb2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::ip </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return IP address </p>
<dl class="section return"><dt>Returns</dt><dd>string|FALSE </dd></dl>
</div>
</div>
<a class="anchor" id="ad2d5e0e045bc7a840a3fe81d74720e71"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::open </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>$path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>$name</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open session </p>
<dl class="section return"><dt>Returns</dt><dd>TRUE </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">$path</td><td>string </td></tr>
<tr><td class="paramname">$name</td><td>string </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a3a45d45b017b282e438f91c113905442"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::read </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>$id</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return session data in serialized format </p>
<dl class="section return"><dt>Returns</dt><dd>string|FALSE </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">$id</td><td>string </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a7f3be5dc562f7924df61113b30f07f17"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::stamp </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return Unix timestamp </p>
<dl class="section return"><dt>Returns</dt><dd>string|FALSE </dd></dl>
</div>
</div>
<a class="anchor" id="a5ee8f519be2a3018d95f031514ffd4bb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Session::write </td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>$id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>$data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Write session data </p>
<dl class="section return"><dt>Returns</dt><dd>TRUE </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">$id</td><td>string </td></tr>
<tr><td class="paramname">$data</td><td>string </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>session.php</li>
</ul>
</div><!-- contents -->