Re: [PHP] Add methods to object dinamically

2004-10-26 Thread Greg Donald
On Tue, 26 Oct 2004 18:13:10 +0200, Francisco M. Marzoa Alonso <[EMAIL PROTECTED]> wrote: > I've seen that's possible to add members to objects dinamically, in example: > > The question is, is it possible to add methods in the same way? Why not just extend the class and add the new functions ther

[PHP] Add methods to object dinamically

2004-10-26 Thread Francisco M. Marzoa Alonso
I've seen that's possible to add members to objects dinamically, in example: class MyClass { private $a; } $MyObject = new MyClass (); $MyObject->b = 1; Now $MyObject has a public member called 'b' that has a value of '1'. The question is, is it possible to add methods in the same way? I meant s