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,B,C) with

Re: [PHP] Multiple Inheritance Needed in OOP?

2009-12-29 Thread Daniel Egeberg
On Wed, Dec 30, 2009 at 01:24, Daniel Kolbo kolb0...@umn.edu 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,

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 kolb0...@umn.edu 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

[PHP] Multiple Inheritance Needed in OOP?

2009-12-28 Thread Daniel Kolbo
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 properties (a number is a distinct property or method). A: 1, 2, 3 B: 1,

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 properties

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 using a framework

[PHP] Multiple Inheritance Concern

2009-12-25 Thread Daniel Kolbo
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 libraries. The trouble is, I want to also

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 libraries. The

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), and i'm

[PHP] Multiple Inheritance

2008-02-27 Thread chetan rane
Hi All Dose anyone know how to implement multiple inheritance in PHP 5. Interfaces dosent work . I have already Tried it. -- Have A pleasant Day Chetan. D. Rane Location: India Contact: +91-9986057255 other ID: [EMAIL PROTECTED] [EMAIL PROTECTED]

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 I'm

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 that ;)

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 following

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:

[PHP] Multiple inheritance: a technique

2006-03-18 Thread Manuel Amador (Rudd-O)
Hello, everyone. I'm (by nature) a Python coder, and (by fiat) a PHP one. Yes, I code in Python for fun, and PHP for work. Despite that, I'm extremely thankful for the efforts poured into PHP. It's a great language. Except for one thing. It lacks multiple inheritance. But PHP 5 has the

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 happen to

[PHP] Multiple Inheritance

2004-12-10 Thread Chris Boget
What are some of the things you guys do to get around the fact that classes in php4 can't do multiple inheritance? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 use classes

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

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

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 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 Oracle

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

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 saying

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

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 'close

FW: [PHP] Multiple Inheritance

2004-12-10 Thread Justin Palmer
To: 'Greg Donald' Subject: RE: [PHP] Multiple Inheritance Hi, What do you do for Unit Testing in procedural world? I think that this is a nice addition to the OO world. I have not heard of a tool for procedural, is there any? Kind regards, Justin Palmer -Original Message- From: Greg

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 use classes

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

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 Engineer

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 Justin Palmer
://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 for a while now but would not concider myself

[PHP] Multiple Inheritance Emulation

2002-09-27 Thread Julio Nobrega
I don't fully understand OOP, so my snippet might be wrong. But I need to emulate Multiple Inheritance for a script, so I've made the following, which I ask for opinions since I am not so sure if it will always work. class multipleInheritance { function callClass($class_to_call) {