Class Zend_Session_Core

Description

Zend_Session_Core

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

Located in /Zend/Session/Core.php (line 46)


	
			
Class Constant Summary
 _THROW_NOT_READABLE_MSG = 'Zend_Session_Core is not marked as readable.'
 _THROW_NOT_WRITABLE_MSG = 'Zend_Session_Core is currently marked as read-only.'
Method Summary
 static void destroy ([bool $remove_cookie = true], [bool $readonly = true])
 static void expireSessionCookie ()
 static void forgetMe ()
 static string getId ()
 static Zend_Session_Core getInstance ([boolean $instanceMustExist = false])
 static ArrayObject getIterator ()
 static bool isRegenerated ()
 static bool isStarted ()
 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 ()
 static void stop ()
 static void writeClose ([bool $readonly = true])
 void __construct ()
 mixed namespaceGet (string $namespace, [string $name = null])
 bool namespaceIsset (string $namespace, [string $name = null])
 void namespaceSet (string $namespace, string $name, mixed $value)
 void namespaceSetExpirationHops (string $namespace, int $hops, [mixed $variables = null], [bool $hopCountOnUsageOnly = false])
 void namespaceSetExpirationSeconds (string $namespace, int $seconds, [mixed $variables = null])
 void namespaceUnset (string $namespace, [string $name = null])
 void _startNamespace (string $namespace)
 void __clone ()
Methods
static destroy (line 541)

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

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

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

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

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

getId() - get the current session id

  • access: public
static string getId ()
static getInstance (line 266)

getInstance() - Enfore the Singleton of the core.

  • access: public
  • throws: Zend_Session_Exception
static Zend_Session_Core getInstance ([boolean $instanceMustExist = false])
  • boolean $instanceMustExist: - OPTIONAL prevents Zend_Session_Core from auto-starting itself, if needed
static getIterator (line 991)

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

  • access: public
static ArrayObject getIterator ()
static isRegenerated (line 449)

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

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

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

  • access: public
static bool isStarted ()
static regenerateId (line 292)

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

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

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

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

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

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

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

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

setSaveHandler() - Session Save Handler assignment

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

start() - Start the session.

  • access: public
  • throws: Zend_Session_Exception
static void start ()
static stop (line 506)

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

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

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

Constructor

  • access: public
  • throws: Zend_Session_Exception
void __construct ()
namespaceGet (line 872)

namespaceGet() - get a variable from a namespace.

  • access: public
mixed namespaceGet (string $namespace, [string $name = null])
  • string $namespace
  • string $name
namespaceIsset (line 796)

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

  • access: public
bool namespaceIsset (string $namespace, [string $name = null])
  • string $namespace
  • string $name
namespaceSet (line 853)

namespaceSet() - set a variable within a namespace.

  • access: public
  • throws: Zend_Session_Exception
void namespaceSet (string $namespace, string $name, mixed $value)
  • string $namespace
  • string $name
  • mixed $value
namespaceSetExpirationHops (line 947)

namespaceSetExpirationHops() -

  • access: public
  • throws: Zend_Session_Exception
void namespaceSetExpirationHops (string $namespace, int $hops, [mixed $variables = null], [bool $hopCountOnUsageOnly = false])
  • string $namespace
  • int $hops
  • mixed $variables
  • bool $hopCountOnUsageOnly
namespaceSetExpirationSeconds (line 907)

namespaceSetExpirationSeconds() - exprire a namespace, or data within after a specified number of seconds.

  • access: public
  • throws: Zend_Session_Exception
void namespaceSetExpirationSeconds (string $namespace, int $seconds, [mixed $variables = null])
  • string $namespace
  • int $seconds
  • mixed $variables
namespaceUnset (line 820)

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

  • access: public
  • throws: Zend_Session_Exception
void namespaceUnset (string $namespace, [string $name = null])
  • string $namespace
  • string $name
_startNamespace (line 783)

_startNamespace() - while this method is public, its really only intended use is by the constructor of Zend_Session object. This method initializes the session namespace.

  • access: public
void _startNamespace (string $namespace)
  • string $namespace
__clone (line 770)

Clone overriding - make sure that a developer cannot clone the core instance

  • access: public
  • throws: Zend_Session_Exception
void __clone ()
Class Constants
_THROW_NOT_READABLE_MSG = 'Zend_Session_Core is not marked as readable.' (line 198)

Error message thrown when an action requires reading session data, but current Zend_Session_Core is not marked as readable.

_THROW_NOT_WRITABLE_MSG = 'Zend_Session_Core is currently marked as read-only.' (line 191)

Error message thrown when an action requires modification, but current Zend_Session_Core has been marked as read-only.

Documentation generated on Thu, 18 Jan 2007 09:52:36 -0800 by phpDocumentor 1.3.1