Re: One class, one file?

From: Date: Sat, 07 May 2005 13:01:41 +0000
Subject: Re: One class, one file?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37534@lists.php.net to get a copy of this message
Hi Christian & all ! I don't see the necessity of this 1 class/ 1 file, I love oo but I don't think it implies such adherence to the file system. In so far, your "object wrappers" are generic, light and necessary to the head class, I vote +1. Hope that does not deserve your point of view. Hmmm... I must admit that your discussion with Justin is quite unclear to me ... à+ -- bertrand Gugger http://toggg.com/ Christian Weiske wrote:
Hello all, I was wondering if every class has to be in one file? My Net_Wifi package has one class which contains the functionality, and two ones which are "object wrappers" to access the data returned from the main class, e.g. class Net_Wifi { function scan() {
       $obj = new Net_Wifi_Data;
       $obj->essid = "asd";
       $obj->rate  = "11";
       return $obj;
} } class Net_Wifi_Data { var $essid = null; var $rate = null; } So Net_Wifi_Data is just a container class for simple data. Would it be ok to not pack it into an own file but append it to Net/Wifi.php? Regards/MfG, Christian Weiske


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