Re: [PEPr] Proposal for HTTP::HTTP_Spider

From: Date: Fri, 05 Mar 2004 18:44:38 +0000
Subject: Re: [PEPr] Proposal for HTTP::HTTP_Spider
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26144@lists.php.net to get a copy of this message
Stefan Neufeind wrote:
PEAR_PackafeFileManager just has it for documentation purpose. Have a look at the comments above: http://cvs.php.net/co.php/pear/PEAR_PackageFileManager/PackageFileMana ger.php?r=1.34 This wouldn't have been possible without an empty constructur.
This is crazy. So, the PHP class has additional methods solely for the purpose of documenting that the methods shouldn't be used!?! ... I suppose this is what they mean by "tail wagging the dog". A legitimate reason to create an empty constructor would be if your class is going to be frequently subclassed (e.g. if it is abstract) and you want to allow subclasses to call your constructor (where you reserve the right to add init code at some point in the future). I think there is still some question as to whether PHP5 will someday allow calling parent::__construct() if there is no such method. Hans

« previous php.pear.dev (#26144) next »