Re: How can I get a list of object vars?
| From: | Robin Vickery | Date: | Thu, 02 Aug 2007 16:05:29 +0000 |
| Subject: | Re: How can I get a list of object vars? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260065@lists.php.net to get a copy of this message | ||
On 02/08/07, js <ebgssth@gmail.com> wrote:
> Hi list.
>
> I'm trying to write a ORM in PHP.
> I want the ORM to have metadata mapping, which have a list of properties name
> and the value, without using any external file.
> (I like simple one, not want messy XML)
>
> I'm thinking PHP's reflective functions might help me to do that
> and treid get_object_vars but it doesn't return properties name
> and even value itself when it haven't been assigned any value.
>
> Is there any good way to get a list of properties name and the value?
$properties = (array) $myObject;
no?
-robin