Zend Framework: displaying Objects as arrays in console

36 views
Skip to first unread message

Olagato

unread,
Sep 11, 2008, 11:54:32 AM9/11/08
to FirePHP
Hi everyone, I'm newbie.
I'm using Zend_Log_Writer_Firebug, it's fantastic: ZF 1.6.0, Firebug
1.2.0, firephp 0.1.2

Zend objects like Zend_Config_Xml are displayed in console if you
write:
$config_xml = new Zend_Config_Xml ('/home/www/html/config.xml',
'develop' );
$logger->log($config_xml->toArray(), Zend_Log::INFO);
This is because of configuration data read into Zend_Config_Xml are
always returned as strings.

I'd like a Zend_Acl object to be displayed like an array. I have the
same matter with others protected Objects like Zend_Session_Namespace.
I'm trying in my code:
$logger->log($acl, Zend_Log::INFO);
fb( $acl, 'acl');
But an empty array is being shown.

Is there a native firephp way or snippet to display these objects as
an array?
(I wouldn't like to implement a "toString()" method in the Zend_Acl
class)

Greetings.





Christoph Dorn

unread,
Sep 11, 2008, 1:59:11 PM9/11/08
to FirePHP
The FirePHP google group has moved to http://forum.firephp.org/

At this time you can only log public object variables. There are plans
to enable logging of private and protected variables as well.

For now you would need to make modifications to Zend_Json_Encoder and
the classes you want to log.

Christoph
Reply all
Reply to author
Forward
0 new messages