class FOO
{
function Fred()
{
echo "Fred in FOO";
}
}
class BAR
{
function Fred()
{
echo "Fred in BAR";
}
}
class BAZFactory
{
"Martin Towell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What about something like this?
I've been playing with that same approach this evening.
But I guess I was hoping for a more direct, 1 level of inderection instead
of 2.
But, by making a "base" method in the main cl
->subclass = new FOO();
if ($num == 2) $this->subclass = new BAR();
}
function Fred() { $this->subclass->Fred(); }
}
-Original Message-
From: jsWalter [mailto:[EMAIL PROTECTED]
Sent: Thursday, 25 September 2003 4:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Q on Class, in
I have a quandary and I hope I can explain myself well enough that someone
may understand and enlighten me.
I am in the middle of building a (largish) Class. It is done for the most
part, at least all pieces are there. Now I'm just trying to put the pieces
together in a logical order.
This is my i
4 matches
Mail list logo