Thanks for tips David! I'll play with your suggestion.
I've never used abstract methods, but if I'm understanding the code
you posted, they look pretty useful.
I may be back with questions.
Appreciate the help. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
There's no way to bypass an overridden method using "parent", but you could
add an abstract method that Child would implement.
class Parent
function __construct() {
$this->foo = $this->getFoo();
}
abstract function getFoo();
}
David
On Fri, Jun 21, 2013 at 12:54 PM, Micky Hulse
wrote:
> 2. Is there a way for me to pass $foo to the parent class, from the
> child, without having to ferry that variable through the abstract
> class?
I should mention, I'm working on some code where I don't have the
ability to modify the "parent"
3 matches
Mail list logo