Source for file Basic.class.php
Documentation is available at Basic.class.php
* Gumbo Library Framework
* This library is being released under the terms of the New BSD License. A
* copy of the license is packaged with the software (LICENSE.txt). If no
* copy is found, a copy of the license template can be found at:
* http://www.opensource.org/licenses/bsd-license.php
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
gumbo_load ("Interface_Session");
/** @var int $_lifetime Session lifetime (in seconds) */
/** @var string $_path Session path */
/** @var string $_domain Session domain */
/** @var bool $_secure Session secure only */
* Returns a SESSION value
public function __get ($key) {
return $this->get ($key);
public function __set ($key, $val) {
* Returns if a SESSION variable exists
* @throws Gumbo_Exception
return isset
($_SESSION [$key]);
$e->setFunction (__METHOD__
);
* Unsets a SESSION variable
* @throws Gumbo_Exception
if (!isset
($_SESSION [$key])) {
unset
($_SESSION [$key]);
$e->setFunction (__METHOD__
);
public function start () {
* Stops the Session by removing all Session data
public function stop () {
if (isset
($_COOKIE [$this->getName ()])) {
* Sets the Session settings
public function saveSettings ($lifetime, $path=
null, $domain=
null, $secure=
false) {
* Sets a value inside the Session array
* @throws Gumbo_Exception
public function set ($key, $val) {
$e->setFunction (__METHOD__
);
* Sets the Session Lifetime
* @throws Gumbo_Exception
$e->setFunction (__METHOD__
);
* @throws Gumbo_Exception
$e->setFunction (__METHOD__
);
* Sets the Session domain
* @throws Gumbo_Exception
$e->setFunction (__METHOD__
);
* Sets if the Session should be secure
* @throws Gumbo_Exception
$e->setFunction (__METHOD__
);
public function getId () {
* Returns the Session Name
* Returns the value of the Session variable
* @throws Gumbo_Exception
public function get ($key) {
if (!isset
($_SESSION [$key])) {
$e->setFunction (__METHOD__
);
* Returns the SESSION array
* Returns the Session lifetime
* Returns the Session path
* Returns the Session domain
* Returns if the Session is secure