Use:

$siteNamespace = new Zend_Session_Namespace($site_name);

.. in each location where you need access to the session namespace $site_name.
This will work as desired, without resorting to using a registry.

Cheers,
Gavin

Ian Warner wrote:
Hi

In my bootstrap I have the following code:

// Start the global session namespace
Zend_Session::start();
$siteNamespace = new Zend_Session_Namespace($site_name);

If I wish to set session data to this namespace within a controller do I have to use the Registry to take it into the controller or is there a more global way of managing sessions, the tutorial or manual doesn't really cover this

ie

Zend_Registry::set('NAMESPACE', $siteNamespace );

Cheers

Ian

Reply via email to