Zend Framework Session: Introduction


Zend Framework Session Step By Step Tutorial - Part 1: Session is a familiar word in PHP programming. When we build complex application, usually, we involved session. In PHP, we know $_SESSION. It represent a logical, one to one connection between server-site, persistent state data, and user agent client (e.g, web browser).

At Zend Framework, we can use Zend_Session. Zend_Session manage server-side data stored in $_SESSION. And a important class that we must know is Zend_Session_Namespace. Session namespaces provide access to session data using classic namespaces implemented logically as named groups of associative arrays, keyed by strings (similar to normal PHP arrays). Below, is quotes from zend framework manual:

Zend_Session_Namespace instances are accessor objects for namespaced slices of $_SESSION. The Zend_Session component wraps the existing PHP ext/session with an administration and management interface, as well as providing an API for Zend_Session_Namespace to persist session namespaces. Zend_Session_Namespace provides a standardized, object-oriented interface for working with namespaces persisted inside PHP's standard session mechanism. Support exists for both anonymous and authenticated (e.g., "login") session namespaces. Zend_Auth, the authentication component of the Zend Framework, uses Zend_Session_Namespace to store some information associated with authenticated users. Since Zend_Session uses the normal PHP ext/session functions internally, all the familiar configuration options and settings apply (see http://www.php.net/session), with such bonuses as the convenience of an object-oriented interface and default behavior that provides both best practices and smooth integration with the Zend Framework. Thus, a standard PHP session identifier, whether conveyed by cookie or within URLs, maintains the association between a client and session state data.

Still confuse? Don't worry, next post we will try to practice about session at Zend Framework. We will begin with Zend_Session_namespace.



Series this article:
Zend Framework Session: Introduction
Zend Framework Session: Using Namespace
Zend Framework Session: Accessing Session Data
Zend Framework Session: Seing All Values at Namespace
Zend Framework Session: Locking and Unlocking Namespace
Zend Framework Session: Automatic Expiration

Bookmark and Share Tag: framework, zend, zend framework, session Category: PHP Framework Post : April 23rd 2008 Read: 62,246

advertisements


blog comments powered by Disqus