Просмотр файла news/libraries/api/classSession.html

Размер файла: 13.42Kb
<!-- 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
   &#160;<span id="projectnumber">3.2.2</span>
   &#160;<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> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a36e9b941b6944020000d5e28d7f390f8"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:a3a45d45b017b282e438f91c113905442"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:a5ee8f519be2a3018d95f031514ffd4bb"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:a330c28fa28c94f5a64b912b2cab5d1c8"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:ad837635002a0bc1bef56208c940154a7"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:a618050c97f93c7e4a77c6c731cd0bf23"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:a5a446bd12a9bdda3237930bcaa109fb2"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:a7f3be5dc562f7924df61113b30f07f17"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:ac6807a612c0fc952cb52fbb80eb488f0"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</td></tr>
<tr class="memitem:a36373ba15d6c8f932aeea02d7320d7c8"><td class="memItemLeft" align="right" valign="top">&#160;</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">&#160;</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>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSession.html#a5f527ade4d348c3c809712715018ae1a">$sid</a></td></tr>
<tr class="memdesc:a5f527ade4d348c3c809712715018ae1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Session ID. <br/></td></tr>
<tr class="separator:a5f527ade4d348c3c809712715018ae1a"><td class="memSeparator" colspan="2">&#160;</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 &amp; 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">&#160;</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">&#160;</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">&#160;</td>
          <td class="paramname"><em>$path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$name</em>&#160;</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">&#160;</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">&#160;</td>
          <td class="paramname"><em>$id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>&#160;</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 -->