Re: One class, one file?

From: Date: Sat, 07 May 2005 12:16:59 +0000
Subject: Re: One class, one file?
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37532@lists.php.net to get a copy of this message
Christian Weiske wrote:
Hello Justin,
class Net_Wifi_Data { var $essid = null; var $rate = null; }
In this case, since you're not using the OO at all I would suggest returning an assoc array instead.
That would prevent me from documenting the meaning of all the fields in the api docs... With this as an class I have the following: /** * Cell information from a wifi scan. */ class Net_Wifi_Cell {
    /**
    *   The current cell number.
    *   Has nothing to say.
    *   @var int
    */
    var $cell       = null;
    /**
    *   MAC address of the cell (access point or ad-hoc station).
    *   example: 00:40:05:28:EB:45
    *   @var string
    */
    var $mac        = null;
.... Regards/MfG, Christian Weiske
/** * Does some junk with wifi * * @return array An array of format: * <php> * array(
 *     'cell' => 234, // current cell number (int)
 *     'mac'  => '00:40:05:28:EB:45', // MAC address of the cell (access point or ad-hoc station)
 *     '....'
* ); * </php> */ function doesSomeJunkWithWifi(){} Regards, Greg

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