The entire configuration from each module.config.php or Module.php combined into a large bank. You can easily access them through $this->getServiceLocator()->get('config')
When it comes to constants, they should be placed inside the corresponding classes. how
class UserStorage { const SESSIONCONTAINERNAME = 'blubbusersession'; }
This way you can call \My\User\Model\UserStorage::SESSIONCONTAINERNAME whenever you need this information
As for your example, think that you will not need var-code to specify the name of your container session, because the information from your module session data should be available through your Service-Classes modules. But if you still need it, see the cancellation example.
Also, I think it might be a good idea for you to check how zf-commons\ZfcUser does things
Sam
source share