Class Zend_Session

Description

Zend_Session

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

Located in /Zend/Session.php (line 56)

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 575)

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 599)

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

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

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

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

getId() - get the current session id

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

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 720)

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

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

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 467)

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

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

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

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

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 646)

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

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

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

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

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.

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

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 277)

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 304)

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)
  • int $seconds
static sessionExists (line 325)

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

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

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

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

setOptions - set both the class specified

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

setSaveHandler() - Session Save Handler assignment

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

start() - Start the session.

  • access: public
  • throws: Zend_Session_Exception
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 540)

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

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

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::_namespaceIsset()
 Zend_Session_Abstract::_namespaceUnset()
Class Constants

Documentation generated on Wed, 21 Feb 2007 11:59:45 -0800 by phpDocumentor 1.3.1