|
Class: Session
Source Location: Program_Root/Session/Session.php
Session is a class that manages visitor sessions.
Author(s)
Version
- 2.6, 2003-04-23, $Id: Session.php,v 1.5 2006/03/15 06:44:31 lux Exp $
Copyright
- Copyright (C) 2001-2003, Simian Systems Inc.
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Class Methods
constructor Session [line 277]
Session Session(
string
$handler, mixed
$sources, string
$store, string
$username, string
$password, [string
$id = ''], string
$source)
|
|
Constructor method.
Tags:
Parameters:
method allowed [line 667]
boolean allowed(
[string
$resource = 'documents'], [string
$access = 'rw'], [string
$type = 'resource'])
|
|
Specifies whether the user is allowed to access the requested resource. $resource may be a string, or an object or associative array with the properties name, sitellite_acces, and sitellite_status. Valid $access values are r, w, and rw (read, write, and read/write). Valid $type values are resource, access, and status.
Tags:
Parameters:
method allowedSql [line 679]
Returns a piece of SQL that can be slipped into the WHERE clause of a query to check for proper permissions.
Tags:
method append [line 617]
array append(
string
$name, [mixed
$value = false])
|
|
Sets an array value in the session store. If the array is empty, it will create a new array. If the value is false, it will empty the array. If $autoSave is on, check $error if you want to make sure it worked. Returns the array prior to making the change.
Tags:
Parameters:
method authorize [line 392]
boolean authorize(
mixed
$user, mixed
$pass, [mixed
$id = false])
|
|
Check the autorization of a user but do not log them in. Useful for web services or external applications requiring authentication but which should not log the person out on the website through their use.
Tags:
method close [line 561]
Closes the session handler, source, and the store. Call this to log a user out and terminate their session. Please note: when a session is terminated, all data stored in it that is not written to a permanent storage location is lost.
Tags:
method gatherParameters [line 524]
array gatherParameters(
string
$handler, string
$sessionidname)
|
|
Retrieves the appropriate username, password, and session id values from anywhere in the script, which are gathered through the gatherParameters() method of the specified $handler, because the handlers often know more about the environment than this class because they must interact with the visitor.
Tags:
Parameters:
method get [line 579]
Retrieves a value from the session store. Returns false if the value does not exist.
Tags:
Parameters:
method getManager [line 763]
object reference &getManager(
)
|
|
Retrieves a copy of the session manager object.
method getUser [line 740]
void getUser(
[string
$username = false], object
1)
|
|
Finds a user by their email address.
Parameters:
method getUserByEmail [line 754]
void getUserByEmail(
string
$email, object
1)
|
|
Finds a user by their email address.
Parameters:
method init [line 321]
void init(
[string
$path = 'inc/conf/auth'])
|
|
Initializes the session objects, which is necessary to do outside of the constructor because a constructor can't properly reference $this inside of itself it seems.
Tags:
Parameters:
method isValidKey [line 707]
boolean isValidKey(
string
$user, string
$key)
|
|
Checks the validity of the specified recovery key.
Parameters:
method makePendingKey [line 543]
Creates a 32 character string of the form 'PENDING:' plus a 24 character long random string. Used for creating pending accounts.
Tags:
method makeRecoverKey [line 691]
Creates a 32 character string of the form 'RECOVER:' plus a 24 character long random string. Used for recovering passwords.
Tags:
method save [line 645]
Tells the session store to save the values within it.
Tags:
method sendAuthRequest [line 502]
boolean sendAuthRequest(
)
|
|
This method issues a request for authorization to the visitor. This request may be an HTTP WWW-Authenticate header, an HTML sign in form, a SOAP message (providing you have a SOAP handler driver), or just about any conceivable way of making this request.
Tags:
method set [line 596]
mixed set(
string
$name, [mixed
$value = false])
|
|
Sets a value in the session store. If the value is false, it will unset it in the store. If the value is being unset or set to a new value, then the old value is returned. If it is a new value, then the value itself will be returned. If $autoSave is on, check $error if you want to make sure it worked.
Tags:
Parameters:
method setHandlerProperties [line 368]
void setHandlerProperties(
associative
$properties)
|
|
Sets any custom properties of the handler driver.
Tags:
Parameters:
method setSourceProperties [line 357]
void setSourceProperties(
associative
$source, mixed
$properties)
|
|
Sets any custom properties of the source driver.
Tags:
Parameters:
method setStoreProperties [line 379]
void setStoreProperties(
associative
$properties)
|
|
Sets any custom properties of the store driver.
Tags:
Parameters:
method setTimeout [line 346]
void setTimeout(
string
$timeout)
|
|
Sets the value of the $timeout property.
Tags:
Parameters:
method start [line 417]
Starts the session logic. This is typically the stage where the username/password or session id will be verified, so after this stage you will be able to check the $valid property to see if the user is valid.
Tags:
method update [line 719]
boolean update(
[array
$data = array ()], [string
$user = false])
|
|
Updates the user's data in the data source. May update another user than the current one by specifying a username as the second parameter.
Parameters:
|
|