Brandon_R
Brandon_R

Reputation: 121

Zend Session Namespace

I'm having a bit of a collision with the naming of the Zend_Session_Namespace parameter.

What is the convention for the namespace other than "default"? Lets say i want to use it in the frontcontroller, should i name it Zend_Session_Namespace('Zend_Controller'); because the Zend_Auth convention is Zend_Session_Namespace('Zend_Auth');

Upvotes: 1

Views: 1429

Answers (2)

dhaneeshkumar
dhaneeshkumar

Reputation: 1

You can find the solution at Zend Framework reference guide http://framework.zend.com/manual/1.12/en/zend.session.basic_usage.html

It states that "Namespace names are restricted to character sequences represented as non-empty PHP strings that do not begin with an underscore ("_") character. Only core components included in Zend Framework should use namespace names starting with "Zend"."

Hope this helps you

Upvotes: 0

DASPRiD
DASPRiD

Reputation: 1683

You should namespace it in a way you can remember it and where it makes sense. If you are storing e.g. user options for a guest, maybe his name and email address for comments, you should probably name the namespace something like "guest-data". There is no real convention for that.

Upvotes: 2

Related Questions