Class Zend_Session

Description

Zend_Session

  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Session.php (line 54)

Zend_Session_Abstract
   |
   --Zend_Session
Method Summary
 static void destroy ([bool $remove_cookie = true], [bool $readonly = true])
 static void expireSessionCookie ()
 static void forgetMe ()
 static string getId ()
 static ArrayObject getIterator ()
 static bool isReadable ()
 static bool isRegenerated ()
 static bool isStarted ()
 static bool isWritable ()
 static array namespaceGet (string $namespace)
 static bool namespaceIsset (string $namespace)
 static void namespaceUnset (string $namespace)
 static void regenerateId ()
 static void rememberMe ([$seconds $seconds = null])
 static void rememberUntil ([int $seconds = 0])
 static bool sessionExists ()
 static void setId (string $id)
 static void setOptions ([ $userOptions = array()])
 static void start ([bool|array $options = false])
 static void stop ()
 static void writeClose ([bool $readonly = true])
Variables
Methods
static destroy (line 586)

destroy() - This is used to destroy session data, and optionally, the session cookie itself

  • access: public
static void destroy ([bool $remove_cookie = true], [bool $readonly = true])
  • bool $remove_cookie: - OPTIONAL remove session id cookie, defaults to true (remove cookie)
  • bool $readonly: - OPTIONAL remove write access (i.e. throw error if Zend_Session's attempt writes)
static expireSessionCookie (line 610)

expireSessionCookie() - Sends an expired session id cookie, causing the client to delete the session cookie

  • access: public
static void expireSessionCookie ()
static forgetMe (line 289)

forgetMe() - The exact opposite of rememberMe(), a session cookie is ensured to be 'session based'

  • access: public
static void forgetMe ()
static getId (line 501)

getId() - get the current session id

  • access: public
static string getId ()
static getIterator (line 702)

getIterator() - return an iteratable object for use in foreach and the like, this completes the IteratorAggregate interface

  • access: public
static ArrayObject getIterator ()
static isReadable (line 738)

isReadable() - returns a boolean indicating if namespaces can write (use setters)

  • access: public
static bool isReadable ()
static isRegenerated (line 490)

isRegenerated() - convenience method to determine if session_regenerate_id() has been called during this request by Zend_Session.

  • access: public
static bool isRegenerated ()
static isStarted (line 478)

isStarted() - convenience method to determine if the session is already started.

  • access: public
static bool isStarted ()
static isWritable (line 727)

isWritable() - returns a boolean indicating if namespaces can write (use setters)

  • access: public
static bool isWritable ()
static namespaceGet (line 690)

namespaceGet() - get all variables in a namespace Deprecated: Use getIterator() in Zend_Session_Namespace.

  • access: public
static array namespaceGet (string $namespace)
  • string $namespace
static namespaceIsset (line 664)

namespaceIsset() - check to see if a namespace is set

  • access: public
static bool namespaceIsset (string $namespace)
  • string $namespace
static namespaceUnset (line 677)

namespaceUnset() - unset a namespace or a variable within a namespace

  • throws: Zend_Session_Exception
  • access: public
static void namespaceUnset (string $namespace)
  • string $namespace
static regenerateId (line 239)

regenerateId() - Regenerate the session id. Best practice is to call this after session is started. If called prior to session starting, session id will be regenerated at start time.

  • throws: Zend_Session_Exception
  • access: public
static void regenerateId ()
static registerValidator (line 540)

registerValidator() - register a validator that will attempt to validate this session for every future request

  • access: public
static void registerValidator (Zend_Session_Validator_Interface $validator)
static rememberMe (line 275)

rememberMe() - Replace the session cookie with one that will expire after a number of seconds in the future (not when the browser closes). Seconds are determined by self::$_rememberMeSeconds.

plus $seconds (defaulting to self::$_rememberMeSeconds). Due to clock errors on end users' systems, large values are recommended to avoid undesireable expiration of session cookies.

  • access: public
static void rememberMe ([$seconds $seconds = null])
  • $seconds $seconds: integer - OPTIONAL specifies TTL for cookie in seconds from present time()
static rememberUntil (line 302)

rememberUntil() - This method does the work of changing the state of the session cookie and making sure that it gets resent to the browser via regenerateId()

  • access: public
static void rememberUntil ([int $seconds = 0])
  • int $seconds
static sessionExists (line 323)

sessionExists() - whether or not a session exists for the current request

  • access: public
static bool sessionExists ()
static setId (line 514)

setId() - set an id to a user specified id

  • throws: Zend_Session_Exception
  • access: public
static void setId (string $id)
  • string $id
static setOptions (line 180)

setOptions - set both the class specified

  • throws: Zend_Session_Exception
  • access: public
static void setOptions ([ $userOptions = array()])
  • array $userOptions: - pass-by-keyword style array of <option name, option value> pairs
static setSaveHandler (line 218)

setSaveHandler() - Session Save Handler assignment

  • access: public
static void setSaveHandler (Zend_Session_SaveHandler_Interface $interface)
static start (line 342)

start() - Start the session.

  • throws: Zend_Session_Exception
  • access: public
static void start ([bool|array $options = false])
  • bool|array $options: OPTIONAL Either user supplied options, or flag indicating if start initiated automatically
static stop (line 551)

stop() - Disable write access. Optionally disable read (not implemented).

  • access: public
static void stop ()
static writeClose (line 564)

writeClose() - Shutdown the sesssion, close writing and detach $_SESSION from the back-end storage mechanism.

This will complete the internal data transformation on this request.

  • access: public
static void writeClose ([bool $readonly = true])
  • bool $readonly: - OPTIONAL remove write access (i.e. throw error if Zend_Session's attempt writes)

Inherited Methods

Inherited From Zend_Session_Abstract

 Zend_Session_Abstract::_namespaceGet()
 Zend_Session_Abstract::_namespaceGetAll()
 Zend_Session_Abstract::_namespaceIsset()
 Zend_Session_Abstract::_namespaceUnset()
Class Constants

Documentation generated on Sun, 27 May 2007 23:27:33 -0700 by phpDocumentor 1.3.2