[PHP] new $foo-className(); Class name must be a valid object or a string

2008-05-03 Thread Jack Bates
I am trying to load PHP objects stored in a database, where the class name is stored in a column: $object = new $resultSet-getString(1); This fails for the same reason that the following fails: ?php class Foo { public function className() { return 'Foo'; } } $foo = new Foo; $bar =

Re: [PHP] new $foo-className(); Class name must be a valid object or a string

2008-05-03 Thread Stut
On 4 May 2008, at 00:46, Jack Bates wrote: I am trying to load PHP objects stored in a database, where the class name is stored in a column: $object = new $resultSet-getString(1); This fails for the same reason that the following fails: ?php class Foo { public function className() {

Re: [PHP] new $foo-className(); Class name must be a valid object or a string

2008-05-03 Thread Casey
On May 3, 2008, at 4:46 PM, Jack Bates [EMAIL PROTECTED] wrote: I am trying to load PHP objects stored in a database, where the class name is stored in a column: $object = new $resultSet-getString(1); This fails for the same reason that the following fails: ?php class Foo { public