I am a beginer to zend. I want to know about namespaces.
-
what this code means?
$a=new Zend_Session_Namespace(Zend_Registry::get(‘session_variable’));
please help me.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Actually you might need to search on google before posting your question on stack overflow regarding
Zend_Session_Namespace. There are no. of article available on google. But still here is some sort of basic guidance for you about Zend_Session_Namespace.The Zend Framework provides advanced session handling using the
Zend_Sessioncomponent. Using this component, you no longer need to access PHP’s$_SESSIONglobal variable.Zend_Sessionuses namespaces to store your session data. That is, when you want to read or write session data you must first specify a namespace. This allows you to easily store different session data without worrying too much about other values stored in the session.Example:
Read Zend Session Namespace from zend framework’s documentation for more details
$a=new Zend_Session_Namespace(Zend_Registry::get('session_variable'));The above code means : You set your session in zend registry by using zend_registry’s set method somewhere (might be in bootstrap) and you are accessing it by using
zend_registry'sget method.If you are new in Zend Framework I recommend you to please go through following tutorial.
http://www.phpeveryday.com/articles/Zend-Framework-Basic-Tutorial-P840.html
http://framework.zend.com/manual/1.12/en/reference.html
Hope it’ll help you.