Class JModelSession

Description

Session model

Located in /model/model/session.php (line 22)

JObject
   |
   --JModel
      |
      --JModelSession
Direct descendents
Class Description
 class mosSession Legacy class, use JModelSession instead
Variable Summary
 time $gid
 int $guest
 string $time
 string $userid
 string $username
 string $usertype
Method Summary
 JModelSession __construct (database &$db)
 void destroy ()
 string getCookie ()
 void hash (mixed $value)
 void insert (mixed $id)
 void persist ()
 mixed purge ([int $age = 1800])
 void remember (string $username, string $password)
 void update ([mixed $updateNulls = false])
Variables
time $gid = null (line 35)
int $guest = null (line 37)
int $session_id = null (line 25)
  • var: Primary key
string $time = null (line 27)
string $userid = null (line 29)
string $username = null (line 33)
string $usertype = null (line 31)

Inherited Variables

Inherited from JModel

JModel::$_db
JModel::$_error
JModel::$_tbl
JModel::$_tbl_key
Methods
Constructor __construct (line 43)

Constructor

JModelSession __construct (database &$db)
  • database &$db: A database connector object

Redefinition of:
JModel::__construct()
Object constructor to set table and key field

Redefined in descendants as:
destroy (line 109)

Destroys the pesisting session

void destroy ()
getCookie (line 137)
  • return: The cookie|session based session id
string getCookie ()
hash (line 144)

Encodes a session id

void hash (mixed $value)
insert (line 52)
void insert (mixed $id)
persist (line 83)

Set the information to allow a session to persist

void persist ()
purge (line 162)

Purge old sessions

  • return: Resource on success, null on fail
mixed purge ([int $age = 1800])
  • int $age: Session age in seconds
remember (line 99)

Allows site to remember login

void remember (string $username, string $password)
  • string $username: The username
  • string $password: The user password
update (line 67)
void update ([mixed $updateNulls = false])

Inherited Methods

Inherited From JModel

 JModel::__construct()
 JModel::bind()
 JModel::canDelete()
 JModel::check()
 JModel::checkin()
 JModel::checkout()
 JModel::delete()
 JModel::filter()
 JModel::getError()
 JModel::getInstance()
 JModel::getPublicProperties()
 JModel::hit()
 JModel::isCheckedOut()
 JModel::load()
 JModel::move()
 JModel::publish()
 JModel::publish_array()
 JModel::save()
 JModel::store()
 JModel::toXML()
 JModel::updateOrder()

Inherited From JObject

 JObject::__construct()
 JObject::JObject()
 JObject::get()
 JObject::set()
 JObject::toString()
 JObject::__destruct()

Documentation generated on Sat, 4 Feb 2006 14:26:39 +0100 by phpDocumentor 1.3.0RC4