Source for file Session.class.php

Documentation is available at Session.class.php

  1. <?php
  2. /**
  3.  * Gumbo Library Framework
  4.  *
  5.  * LICENSE
  6.  * This library is being released under the terms of the New BSD License.  A
  7.  * copy of the license is packaged with the software (LICENSE.txt).  If no
  8.  * copy is found, a copy of the license template can be found at:
  9.  * http://www.opensource.org/licenses/bsd-license.php
  10.  * 
  11.  * @category Gumbo
  12.  * @package Session
  13.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  14.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  15.  * @author Michael Luster <mluster79@yahoo.com>
  16.  * @link http://sourceforge.net/projects/phpgumbo
  17.  * @version 0.0.1
  18.  */
  19.  
  20. /**
  21.  * Session Interface
  22.  *
  23.  * @category Gumbo
  24.  * @package Session
  25.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  26.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  27.  * @author Michael Luster <mluster79@yahoo.com>
  28.  * @link http://sourceforge.net/projects/phpgumbo
  29.  * @desc Session Interface
  30.  * @version 0.0.1
  31.  */
  32.  
  33.     
  34.     /**
  35.      * Returns a SESSION value
  36.      * @param string $key 
  37.      * @return mix 
  38.      */
  39.     public function __get ($key);
  40.     
  41.     /**
  42.      * Sets the SESSION value
  43.      * @param string $key 
  44.      * @param mix $val 
  45.      */
  46.     public function __set ($key$val);
  47.     
  48.     /**
  49.      * Returns if a SESSION variable exists
  50.      * @param string $key 
  51.      * @return bool 
  52.      */
  53.     public function __isset ($key);
  54.     
  55.     /**
  56.      * Unsets a SESSION variable
  57.      * @param string $key 
  58.      */
  59.     public function __unset ($key);
  60.     
  61.     
  62.     
  63.     /** ACTION METHODS **/
  64.     /**
  65.      * Starts the Session
  66.      * @return bool 
  67.      */
  68.     public function start ();
  69.     
  70.     /**
  71.      * Stops the Session by removing all Session data
  72.      */
  73.     public function stop ();
  74.     
  75.     /**
  76.      * Sets Session settings
  77.      * @param int $lifetime 
  78.      * @param string $path 
  79.      * @param string $domain 
  80.      * @param bool $secure 
  81.      */
  82.     public function saveSettings ($lifetime$path=null$domain=null$secure=false);
  83.     
  84.     
  85.     
  86.     /** MUTATOR METHODS **/
  87.     /**
  88.      * Sets a value inside the SESSION array
  89.      * @param string $key 
  90.      * @param mix $val (primitive values only)
  91.      */
  92.     public function set ($key$val);
  93.     
  94.     /**
  95.      * Sets the Session Lifetime
  96.      * @param int $secs 
  97.      */
  98.     public function setLifetime ($secs);
  99.     
  100.     /**
  101.      * Sets the Session path
  102.      * @param string $path 
  103.      */
  104.     public function setPath ($path);
  105.     
  106.     /**
  107.      * Sets the Session domain
  108.      * @param string $domain 
  109.      */
  110.     public function setDomain ($domain);
  111.     
  112.     /**
  113.      * Sets if the Session should be secure
  114.      * @param bool $val 
  115.      */
  116.     public function setSecure ($val);
  117.     
  118.     
  119.     
  120.     /** ACCESSOR METHODS **/
  121.     /**
  122.      * Returns the Session ID
  123.      * @return string 
  124.      */
  125.     public function getId ();
  126.     
  127.     /**
  128.      * Returns the Session Name
  129.      * @return string 
  130.      */
  131.     public function getName ();
  132.     
  133.     /**
  134.      * Returns the value of the SESSION variable
  135.      * @param string $key 
  136.      * @return string 
  137.      */
  138.     public function get ($key);
  139.     
  140.     /**
  141.      * Returns the SESSION array
  142.      * @return array 
  143.      */
  144.     public function getAll ();
  145.     
  146.     /**
  147.      * Returns the Session lifetime
  148.      * @return int 
  149.      */
  150.     public function getLifetime ();
  151.     
  152.     /**
  153.      * Returns the Session path
  154.      * @return string 
  155.      */
  156.     public function getPath ();
  157.     
  158.     /**
  159.      * Returns the Session domain
  160.      * @return string 
  161.      */
  162.     public function getDomain ();
  163.     
  164.     /**
  165.      * Returns if the Session is secure
  166.      * @return bool 
  167.      */
  168.     public function isSecure ();
  169.     
  170. }
  171.  
  172. ?>