Re: Net_SmartIRC first package.xml
| From: | Stig S. Bakken | Date: | Sun, 22 Dec 2002 01:51:16 +0000 |
| Subject: | Re: Net_SmartIRC first package.xml | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-11796@lists.php.net to get a copy of this message | ||
On Sat, 14 Dec 2002, Mika Tuupola wrote:
> On Sat, 14 Dec 2002, Stijn de Reede wrote:
>
> > As seen in other packages: the main file should be in the directory of
> > the category, all the other files should be in a subdir, with the same
> > name as the main file (without the .php of course). These other files
> > can be further sorted by adding more subdirs in the one subdir.
> > By putting all the files in Net/SmartIRC, it would seem that SmartIRC is
> > in fact a category of it's own.
>
> Yes and if the class gets installed as
>
> /Net/SmarIRC/SmartIRC.php
>
> the classname should be Net_SmartIRC_SmartIRC (classnames
> reflect the installation directory).
Directories != categories
The translation between class name and file name should go from
class->file, not from file->class. If it makes sense to call the class
Net_SmartIRC, the file should be installed as Net/SmartIRC.php.
Net_SmartIRC_SmartIRC is just too awkward.
- Stig