Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend Framework Session Namespace debugging print_r or equivalent

Working with Zend, and the Sessions Namespace, trying to debug an issue I am running where I think something should be set, but it appears that it isn't so I'd like to find a means of seeing the whole namespace object but when I try print_r() or var_dump() on it, all I get is

Zend_Session_Namespace Object ( [_namespace:protected] => msp ) 

So I am wondering cause I can't find anything anywhere else on the subject currently is there a means of viewing that object? Is there a debug method that I can enable/disable for it through zend somehow?

like image 944
chris Avatar asked Dec 01 '25 02:12

chris


1 Answers

You can easily debug it as

print_r($_SESSION) or print_r($_SESSION['YourNameSpace']) or
print_r(Zend_Session::namespaceGet('YourNameSpace'));

Since whenever we try to set property on zend_session_namespace object,thats what it does internally

 $_SESSION[$this->_namespace][$name] = $value;

Where $name refer to the property we are trying to set with vale $value.

like image 57
Tarun Avatar answered Dec 02 '25 15:12

Tarun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!