note 36696 deleted from keyword.extends by danbrown

From: Date: Wed, 17 Jun 2009 19:04:42 +0000
Subject: note 36696 deleted from keyword.extends by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-157028@lists.php.net to get a copy of this message
Note Submitter: robertvanderlinden78 at hotmail dot com ---- the model as in the example of "quinton" is what you want to have. Not the method of "kimh216" with function callClass when calling function C() { //global $a,$b; $this->a = parent::callClass('A');//no effect $this->b = parent::callClass('B');//no effect } you will not have 1 data object.If i wanted to add a function to class A and i wanted to call it , I can only do it from Class C .. otherwise if I were to do $c = new C(); $c->someExtraFunctionThatIsInClassA(); it will give an error stating "Fatal error: Call to undefined function: functionName() in f:\ibserver\www\meuk\classvbs\test.php.php on line 34" ------------ If i add a new function in Person class of the first example of quinton: function boe(){ echo "some text"; } then i can call it by : $family->members[0]->boe(); since the members array has Personobjects in it. Now you have 1 Object that can access every function as a whole. regards rml

« previous php.notes (#157028) next »