You are here: Re: PHP 5 Object Inheritance « PHP « IT news, forums, messages
Re: PHP 5 Object Inheritance

Posted by Matthew Weier O'Phinney on 10/19/13 11:21

* Chris <listschris@leftbrained.org>:
> I've got a collection of Element classes (about 8 different ones). They
> are all subclasses of a single parent element. I'm trying to extend
> their functionality (both the individual classes, and the parent class
> they inherit).
>
> I can extend each Element subclass with it's new specific functionality,
> but I would also like to add specific functionality to all of the
> subclasses. Extending the parent element with the new functionality
> would *seem* to be the way to go, but I can't make it work None of the
> Subclasses inherit from the extended superclass.

That should work. Have you checked your include_path to make sure a
different, unmodified version of the parent class isn't getting loaded?

--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация