I have the following situation.
I wrote some software and split it up into functionality:
class core {
function go{
}
}
class A extends core {
// PHP4 constructor
function A {
$this->go();
}
}
class B extends core {
}
In core I define functions and variables that are to be used
Hi,
Thursday, August 15, 2002, 5:17:00 AM, you wrote:
MA> Well, I actually have a full db class which has a connect and close method
MA> as well as query, fetch_array, etc... What I really want to know is how to
MA> use the methods in my db class from another class (myclass for example)..
MA> D
Do you know where I can find more info on how to use the scope resolution
operator?
My searches aren't giving much (at leant not mcuh regarding php) and in the
manual, it only shows up momentarily as a note in the operators section...
Mark
"Nick Oostveen" <[EMAIL PROTECTED]> wrote in message
That seems more like what I'm looking for..
Thank you, Nick...
Mark
"Nick Oostveen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If you are just trying to access a classes functions without creating an
> instance of it you're probably looking to use the
e:
> $this->mydb(); This way you can always reuse the method from other code.
>
> hth,
> Steve.
>
> -Original Message-
> From: Mark Armendariz [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 2:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP]
If you are just trying to access a classes functions without creating an
instance of it you're probably looking to use the scope resolution operator
::. For this to work all you have to do is ensure that the definition for
the class you wish to use is included into the file containing the clas
AIL PROTECTED]]
Sent: Wednesday, August 14, 2002 2:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP - class question
Hello, To begin.. i'm new to the list...
I'm trying to learn good practices in OOP based PHP. I'm actually a bit new
to OOP in general, but I've done quite a bit
Hello, To begin.. i'm new to the list...
I'm trying to learn good practices in OOP based PHP. I'm actually a bit new
to OOP in general, but I've done quite a bit of reading and playing around
with it in the past couple of months.
What I'm trying to figure out is the proper way to call a class
8 matches
Mail list logo