Re: [PHP] Multiple Inheritance Needed in OOP?

2009-12-29 Thread Daniel Kolbo
Daniel Egeberg wrote: > On Wed, Dec 30, 2009 at 01:24, Daniel Kolbo wrote: >> This way multiple inheritance is available for those that legitimately need >> it [...] > > Could you by any chance provide an example where multiple inheritance > would be required? To be honest, I've never really see

Re: [PHP] Multiple Inheritance Needed in OOP?

2009-12-29 Thread Daniel Egeberg
On Wed, Dec 30, 2009 at 01:24, Daniel Kolbo wrote: > This way multiple inheritance is available for those that legitimately need > it [...] Could you by any chance provide an example where multiple inheritance would be required? To be honest, I've never really seen a use for it, but that may be

Re: [PHP] Multiple Inheritance Needed in OOP?

2009-12-29 Thread Daniel Kolbo
Larry Garfield wrote: > On Monday 28 December 2009 9:45:03 pm Daniel Kolbo wrote: >> Hello, >> >> Okay so PHP designers explicitly decided against multiple inheritances, >> but aren't there legitimate needs for multiple inheritance in OOP? >> >> For example, consider the following three classes (A,

Re: [PHP] Multiple Inheritance Needed in OOP?

2009-12-28 Thread Larry Garfield
On Monday 28 December 2009 9:45:03 pm Daniel Kolbo wrote: > Hello, > > Okay so PHP designers explicitly decided against multiple inheritances, > but aren't there legitimate needs for multiple inheritance in OOP? > > For example, consider the following three classes (A,B,C) with the > following prop

Re: [PHP] Multiple Inheritance Concern

2009-12-26 Thread Daniel Kolbo
Larry Garfield wrote: > On Friday 25 December 2009 8:02:06 pm Daniel Kolbo wrote: >> Hello PHPers, >> >> I've learned that php doesn't support multiple inheritance, b/c if you >> need multiple inheritance usually it is a sign you've got a design >> imperfection...or so they say. >> >> Well, I'm usi

Re: [PHP] Multiple Inheritance Concern

2009-12-25 Thread Larry Garfield
On Friday 25 December 2009 8:02:06 pm Daniel Kolbo wrote: > Hello PHPers, > > I've learned that php doesn't support multiple inheritance, b/c if you > need multiple inheritance usually it is a sign you've got a design > imperfection...or so they say. > > Well, I'm using a framework (Codeigniter), a

Re: [PHP] Multiple Inheritance Concern

2009-12-25 Thread Daniel Kolbo
Daniel Kolbo wrote: > Hello PHPers, > > I've learned that php doesn't support multiple inheritance, b/c if you > need multiple inheritance usually it is a sign you've got a design > imperfection...or so they say. > > Well, I'm using a framework (Codeigniter), and i'm extending the core > librarie

Re: [PHP] Multiple Inheritance

2008-02-27 Thread chetan rane
Thanks Nathan, I had already done that using the Objects of the 2 classes as shown by you in the example 1. but there are one thing in that. If i create the Objects i cannot access the Protected Data from teh parent classes. On Thu, Feb 28, 2008 at 4:33 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:

Re: [PHP] Multiple Inheritance

2008-02-27 Thread Nathan Nobbe
On Wed, Feb 27, 2008 at 12:05 PM, chetan rane <[EMAIL PROTECTED]> wrote: > Hi All > > Dose anyone know how to implement multiple inheritance in PHP 5. > Interfaces dosent work . I have already Tried it. the idea in a single inheritance language is to implement 'multiple inheritance' in the follo

Re: [PHP] Multiple Inheritance

2008-02-27 Thread Zoltán Németh
2008. 02. 27, szerda keltezéssel 22.35-kor chetan rane ezt írta: > Hi All > > Dose anyone know how to implement multiple inheritance in PHP 5. > Interfaces dosent work . I have already Tried it. > there is no multiple inheritance in php5, but multiple interfaces do work, I have already tried tha

Re: [PHP] Multiple Inheritance

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 12:05 PM, chetan rane <[EMAIL PROTECTED]> wrote: > Hi All > > Dose anyone know how to implement multiple inheritance in PHP 5. > Interfaces dosent work . I have already Tried it. Like Java, PHP5 doesn't have multiple inheritance. It does have multiple interfaces, so

Re: [PHP] Multiple Inheritance

2004-12-13 Thread Richard Lynch
Greg Beaver wrote: > Greg Donald wrote: >> with it, but I will go grab a PEAR module if it fits my needs. Code >> re-use may be the only redeeming quality of OO programming, and >> honestly I can re-use your code from a non-OO include file just as >> easily. > > yep, unless the function names happe

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Greg Donald
On Fri, 10 Dec 2004 18:27:12 -0600, Ryan King <[EMAIL PROTECTED]> wrote: > Yeah, but in the case of the Linux kernel there's no programming > language that is both OO and close enough to the metal to program a > kernel (other than maybe Forth??). C++, being a superset of C, would certainly be 'clo

RE: [PHP] Multiple Inheritance

2004-12-10 Thread Michael Sims
Please note that I am specifically *not* weighing in on the OO vs. procedural religious war, but only wanted to make a couple of small comments. :) Richard Lynch wrote: > I spend a *LOT* more time, digging through endless class files, of > what are essentially name-spaces of singleton "objects" tr

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Ryan King
On Dec 10, 2004, at 3:50 PM, Greg Donald wrote: On Fri, 10 Dec 2004 10:32:30 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: What I do is not use classes. I agree. Some of the worst arguments for OO I've heard recently: "OO programming lets you organize your code better." So what you're sayi

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Ryan King
On Dec 10, 2004, at 4:17 PM, Greg Beaver wrote: The biggest hogs in php programming are: 1) unnecessary images and animated crap/unnecessary javascript 2) terrible database usage 3) too much complexity in the design I would like to add 0) Compilation. Many scripts take longer to compile than execut

RE: [PHP] Multiple Inheritance

2004-12-10 Thread Justin Palmer
gle.com ); Archives::getUri( http://marc.theaimsgroup.com/?l=php-general ); -Original Message- From: Mike [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 11:08 AM To: 'PHP General' Subject: RE: [PHP] Multiple Inheritance Richard, Thank you for that. I've been writing PHP apps

RE: [PHP] Multiple Inheritance

2004-12-10 Thread Richard Lynch
> Have you ever written a project and then moved to the next noticing that > you are doing some of the same things from last project (connecting to a > database, reading a file, writing to a file, etc...)? Not quite the same thing. When it is exactly the same thing, I just copy & paste the code.

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Greg Donald
On Fri, 10 Dec 2004 17:17:53 -0500, Greg Beaver <[EMAIL PROTECTED]> wrote: > yep, unless the function names happen to conflict with ones you've > already written. for file in *.php; do cp $file $file.tmp sed -e "s/bad/good/g" $file.tmp >$file rm $file.tmp done -- Greg Donald Zend Certified Engi

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Greg Beaver
Greg Donald wrote: with it, but I will go grab a PEAR module if it fits my needs. Code re-use may be the only redeeming quality of OO programming, and honestly I can re-use your code from a non-OO include file just as easily. yep, unless the function names happen to conflict with ones you've alrea

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Greg Donald
On Fri, 10 Dec 2004 13:04:49 -0800, Justin Palmer <[EMAIL PROTECTED]> wrote: > What if you were to build an application around the MySQL database. You > have just finished the project and you are taking it to your boss. You > get there and then your boss says, "you know what I would rather use >

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Greg Donald
On Fri, 10 Dec 2004 10:32:30 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > What I do is not use classes. I agree. Some of the worst arguments for OO I've heard recently: "OO programming lets you organize your code better." So what you're saying is that you're not capable of organizing

Re: [PHP] Multiple Inheritance

2004-12-10 Thread Richard Lynch
> What are some of the things you guys do to get around the > fact that classes in php4 can't do multiple inheritance? What I do is not use classes. At all. :-) As a Lisp programmer of over a decade, I think I can safely say I am an OO proponent. Yet, every time I sit down to program a web app

RE: [PHP] Multiple Inheritance

2004-12-10 Thread Justin Palmer
: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 10:33 AM To: Chris Boget Cc: PHP General Subject: Re: [PHP] Multiple Inheritance > What are some of the things you guys do to get around the fact that > classes in php4 can't do multiple inheritance? What I do is not

RE: [PHP] Multiple Inheritance

2004-12-10 Thread Mike
Richard, Thank you for that. I've been writing PHP apps for a while now but would not concider myself an "expert". I just enjoy doing it and I know a fair bit about what I'm doing. One thing I never quite got into (with PHP) is OO. Why - because nothing I ever did really seemed to make sense as O

RE: [PHP] Multiple Inheritance

2004-12-10 Thread Justin Palmer
Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 10:33 AM To: Chris Boget Cc: PHP General Subject: Re: [PHP] Multiple Inheritance > What are some of the things you guys do to get around the fact that > classes in php4 can't do multiple inheritance? What I do is not