Re: [PHP] Re: calling parent class method from the outside

2007-07-02 Thread Richard Lynch
On Mon, July 2, 2007 3:44 pm, admin wrote: IMHO, you were f'ed from the microsecond where you decided it was a Good Idea (tm) to have an object instance for each row in the DB... That just plain won't scale up very well at all for a large table, if you ever need to get code re-use and do somethin

Re: [PHP] Re: calling parent class method from the outside

2007-07-02 Thread admin
Jim Lucas wrote: Rihad wrote: Now will you mentally copy and paste the above code several times, doing the necessary text substitutions, what will you get? Three identical copies of doSetColumn() in each class! And the real doSetColumn() is a bit heavier than a one-liner. We come full circle

[PHP] Re: calling parent class method from the outside

2007-07-02 Thread Colin Guthrie
admin wrote: > Once again, calling the parent version of a method "externally" is > allowed in C++ (and whoever said it was bad design should speak up to > Bjarne Stroustrup ;-)) Any such trick in PHP? I stand suitably corrected :) I didn't realise you could do that in C++ to be honest. I'm tryin

Re: [PHP] Re: calling parent class method from the outside

2007-07-02 Thread Jim Lucas
Rihad wrote: Now will you mentally copy and paste the above code several times, doing the necessary text substitutions, what will you get? Three identical copies of doSetColumn() in each class! And the real doSetColumn() is a bit heavier than a one-liner. We come full circle. I don't unde

Re: [PHP] Re: calling parent class method from the outside

2007-07-02 Thread Rihad
Jim Lucas wrote: admin wrote: OK, here we go: Propel in Symfony uses generated model classes representing DB rows, stub classes inheriting from them ready to be used (such as below), and accessors representing data columns: [snipped] This is a little different then what you are trying above, b

Re: [PHP] Re: calling parent class method from the outside

2007-07-02 Thread Jim Lucas
admin wrote: Colin Guthrie wrote: admin wrote: Inside the body of method foo() you can of course use syntax like parent::foo(). But is there a way to call the parent version of obj->foo() outside the class? That kind of syntax is allowed in C++, for example: Aclass a; if (a.Aparent::foo()) ...;

[PHP] Re: calling parent class method from the outside

2007-07-02 Thread admin
Colin Guthrie wrote: admin wrote: Inside the body of method foo() you can of course use syntax like parent::foo(). But is there a way to call the parent version of obj->foo() outside the class? That kind of syntax is allowed in C++, for example: Aclass a; if (a.Aparent::foo()) ...; [snipped]

[PHP] Re: calling parent class method from the outside

2007-07-02 Thread Colin Guthrie
admin wrote: > Inside the body of method foo() you can of course use syntax like > parent::foo(). But is there a way to call the parent version of > obj->foo() outside the class? That kind of syntax is allowed in C++, for > example: Aclass a; if (a.Aparent::foo()) ...; > > Some contrived example t