Class Zend_Session

Description

Zend_Session

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

Located in /Session.php (line 49)

Zend_Session_Abstract
   |
   --Zend_Session
Variable Summary
 static bool|bitset $_throwStartupExceptions
 static bool $_unitTestEnabled
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 array|string getOptions ([string $optionName = null])
 static bool isDestroyed ()
 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])
 Zend_Session __construct ()
Variables
static bool|bitset $_throwStartupExceptions = true (line 64)

$_throwStartupException

  • var: This could also be a combiniation of error codes to catch
  • access: protected
static bool $_unitTestEnabled = false (line 57)

Whether or not Zend_Session is being used with unit tests

  • access: public

Inherited Variables

Inherited from Zend_Session_Abstract

Zend_Session_Abstract::$_expiringData
Zend_Session_Abstract::$_readable
Zend_Session_Abstract::$_writable
Methods
static destroy (line 713)

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

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

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

forgetMe() - Write a volatile session cookie, removing any persistent cookie that may have existed. The session would end upon, for example, termination of a web browser program.

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

getId() - get the current session id

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

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

  • throws: Zend_Session_Exception
  • access: public
static ArrayObject getIterator ()
static getOptions (line 238)

getOptions()

  • access: public
static array|string getOptions ([string $optionName = null])
  • string $optionName: OPTIONAL
static getSaveHandler (line 288)

getSaveHandler() - Get the session Save Handler

  • access: public
static Zend_Session_SaveHandler_Interface getSaveHandler ()
static isDestroyed (line 414)

Whether or not session has been destroyed via session_destroy()

  • access: public
static bool isDestroyed ()
static isReadable (line 875)

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

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

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

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

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

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

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

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

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

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

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

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

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

rememberMe() - Write a persistent cookie that expires after a number of seconds in the future. If no number of seconds is specified, then this defaults to self::$_rememberMeSeconds. Due to clock errors on end users' systems, large values are recommended to avoid undesirable 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 369)

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

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

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

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

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

setSaveHandler() - Session Save Handler assignment

  • access: public
static void setSaveHandler (Zend_Session_SaveHandler_Interface $saveHandler, Zend_Session_SaveHandler_Interface $interface)
static start (line 427)

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

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

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

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)
Constructor __construct (line 187)

Constructor overriding - make sure that a developer cannot instantiate

  • access: protected
Zend_Session __construct ()

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 Mon, 21 Jun 2010 15:44:33 -0400 by phpDocumentor 1.4.3