Shawn McKenzie wrote:
Shawn McKenzie wrote:
Peter van der Does wrote:
On Thu, 21 May 2009 14:08:11 -0500
Shawn McKenzie wrote:
This doesn't make sense. You say "class A needs to be extended with
another class", however what you show below is "class A extending
framework_class".
I worded
Shawn McKenzie wrote:
> Peter van der Does wrote:
>> On Thu, 21 May 2009 14:08:11 -0500
>> Shawn McKenzie wrote:
>>
>>
>>> This doesn't make sense. You say "class A needs to be extended with
>>> another class", however what you show below is "class A extending
>>> framework_class".
>>>
>> I worde
Peter van der Does wrote:
> On Thu, 21 May 2009 14:08:11 -0500
> Shawn McKenzie wrote:
>
>
>> This doesn't make sense. You say "class A needs to be extended with
>> another class", however what you show below is "class A extending
>> framework_class".
>>
>
> I worded it wrong, I apologize.
> C
On Thu, 21 May 2009 14:08:11 -0500
Shawn McKenzie wrote:
>
> This doesn't make sense. You say "class A needs to be extended with
> another class", however what you show below is "class A extending
> framework_class".
>
I worded it wrong, I apologize.
Class A needs to be an extension of the f
Peter van der Does wrote:
> 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 {
>
Peter van der Does wrote:
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 va
What does "$this->A(); "" do ?(in constructor of class B)
does it make another instance of class A, and if not why do I have to
parse vars to the A constructor ($this->A($var1,$var2))?.
I dont think that is what I want.
A can have many instances of B. B can have many instances of C.
Well in this example it will get to an infinite loop, but anyway like
Thomas said you must check into extending classes.
Andy
Thomas Munz wrote:
> Use 'extends' syntax for sub classes
>
> class A {
> var $some_var;
>var $class_B;
> function A(){
>
Use 'extends' syntax for sub classes
class A {
var $some_var;
var $class_B;
function A(){
$this->class_B = new B();
$this->some_var=2;
}
}
class B extends A {
var $class_C;
function B(){
$
once their instantiated, they're just like any other variable - that is: if
a "normal" variable, declared in the same place as the object, is accessable
in another function, then the object will be too.
HTH
Martin
-Original Message-
From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
Sen
Objects which are instantiated from classes on one page are not available on
the next page. You have to use session functionality.
-Original Message-
From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 8:17 PM
To: Php-General-List (E-mail)
Subject: [PHP] cl
Well, I guess many things are "accepted" now, but here's my two cents:
I wouldn't access global variables, instead you should pass everything you
need as parameters. Using global variables can come back to bite you
occasionally because you may think you are changing a local variable at one
po
The whole idea with object-oriented programming is polymorphism and
encapsulation. You do not want your classes to access global variables but
access that information through objects and messaging between objects. If
you are referring to the use of non-member as being outside of the class,
then
13 matches
Mail list logo