Does PHP support multiple inheritence?
If not, how would one workaround it when one needs a class to inherit
from multiple classes? 4 3350
Mukesh_Singh_Ni ck wrote:
Does PHP support multiple inheritence?
Yes... well, kind of. See the aggregate() function in the manual -- it
provides a very good approximation of multiple inheritance.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 56 days, 13:44.]
Fake Steve is Dead; Long Live Fake Bob! http://tobyinkster.co.uk/blog/2007/08/13/fake-bob/
On 16 Aug, 11:07, Toby A Inkster <usenet200...@t obyinkster.co.u k>
wrote:
Mukesh_Singh_Ni ck wrote:
Does PHP support multiple inheritence?
Yes... well, kind of. See the aggregate() function in the manual -- it
provides a very good approximation of multiple inheritance.
(which doesn't mean its a good idea)
C.
On Aug 16, 3:23 pm, "C." <colin.mckin... @gmail.comwrote :
On 16 Aug, 11:07, Toby A Inkster <usenet200...@t obyinkster.co.u k>
wrote:
Mukesh_Singh_Ni ck wrote:
Does PHP support multiple inheritence?
Yes... well, kind of. See the aggregate() function in the manual -- it
provides a very good approximation of multiple inheritance.
(which doesn't mean its a good idea)
Why not?
pakalk wrote:
On Aug 16, 3:23 pm, "C." <colin.mckin... @gmail.comwrote :
>On 16 Aug, 11:07, Toby A Inkster <usenet200...@t obyinkster.co.u k> wrote:
>>Mukesh_Singh_ Nick wrote: Does PHP support multiple inheritence? Yes... well, kind of. See the aggregate() function in the manual -- it provides a very good approximation of multiple inheritance.
(which doesn't mean its a good idea)
Why not?
Probably because most of the time multiple inheritance is grossly misused.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== === This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John |
last post by:
Hi,
I am trying to create a class heirarchy similar to the following:
// base interface
class ICar {
public: virtual void start() = 0;
};
// add members to that interface, but retain base capabilities
|
by: agrawal_rajesh |
last post by:
Its interesting to know that We can create multiple interfaces in a single class in visiual studio 6.0 ATL. But I am surprised to see that we can't create the same in Visual studio .Net. In .Net Every Class must have only one Interface.
I need to create multiple interfaces in a single class so that I can have only one CLSID and client should call coCreateInstance only once.
If any body has worked in this in .Net then pls let me know the...
|
by: pembed2003 |
last post by:
Hi all,
I recently saw a piece of code that looks like:
class one{public: one(){} };
class two : public virtual one{public: two(){} };
class three : virtual public one{public: three(){} };
My questions:
1. What does it mean to have a virtual inheritenec? When do you want
|
by: km |
last post by:
Hi all,
In the following code why am i not able to access class A's object attribute - 'a' ? I wishto extent class D with all the attributes of its base classes. how do i do that ?
thanks in advance for enlightment ...
here's the snippet
#!/usr/bin/python
|
by: Tony Johansson |
last post by:
Hello Experts!
I just play around just to try to understand this about multiple
inheritance.
You have all the class definition below and at the bottom you have the main
program.
So here I use multiple inheritance.
One top class called MBase and below this we have D1 and D2 on the same
level.
| |
by: Matthew Louden |
last post by:
I want to know why C# doesnt support multiple inheritance? But why we can
inherit multiple interfaces instead? I know this is the rule, but I dont
understand why. Can anyone give me some concrete examples?
|
by: Bob Rundle |
last post by:
I heard that managed C++ in VS 2005 supports multiple inheritence. Is this
true?
Bob Rundle
|
by: Neelesh Bodas |
last post by:
This might be slightly off-topic.
Many books on C++ consider multiple inheritence as an "advanced"
concept. Bruce Eckel says in TICPP, volume 2 that "there was (and
still is) a lot of disagreement about whether
is essential in C++".
Are there any disadvantages of using multiple inheritence?
|
by: Larry Smith |
last post by:
I just read a blurb in MSDN under the C++ "ref" keyword which states that:
"Under the CLR object model, only public single inheritance is supported".
Does this mean that no .NET class can ever support multiple inheritance. In
C++ for instance I noticed that the compiler flags an error if you use the
"ref" keyword on a class with multiple base classes. This supports the above
quote. However, under the "CodeClass2.Bases" property (part...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |