Get an array from a qcubed object

Login or register to post comments
2 replies [Last post]
Offline
Joined: 04/29/2009

Is there a way to get an array from a qcubed instantiated object? I am trying to export to csv and I need all the object properties in an array.

Offline
Joined: 04/22/2009

Hello,

I don't think that QCubed offers that. Although there is a PHP function which might help you:

<?php

array get_object_vars ( object $object )
?>

http://php.net/manual/en/function.get-object-vars.php

get_object_vars() belongs to a very handy set of functions for querying object properties.

Be aware, though, that some properties are objects representing foreign key relationships. These objects might be empty for performance reasons unless you have accessed them prior to querying for the properties using get_object_vars.

Cheers

Helge

Offline
Joined: 08/06/2010