Thursday, May 30, 2013

Register and Remove a session in Zend

To register a session in Zend, you may use Zend_Session_Namespace class. And then, just assign value for your session variables:
$job = new Zend_Session_Namespace('application');
$job->username = 'test';
To remove username from the session just do :
unset($job->username);
To remove the whole 'application' namespace and asociated data you can use :
Zend_Session::namespaceUnset('application');

0 comments:

Post a Comment