You are here: Re: using __call() to simulate extending classes « PHP Programming Language « IT news, forums, messages
Re: using __call() to simulate extending classes

Posted by Janwillem Borleffs on 06/21/07 20:19

surf wrote:
> I'm not sure if I can override a method in a
> class that someone else declared in PHP which is essentially how it
> might have been done in Perl
>

When you are using PHP4, you can extend classes as you would do in Java:

class Foo extends Base {}

Afterwards, you can declare the methods you want to override, and leave out
the ones you want to use unchanged from the base class.

In PHP5, classes and methods can be declared final, which means that you
cannot extend/override them this way.


JW

 

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

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