Re: Re: 1 class = 1 file?
| From: | Mark Wiesemann | Date: | Sun, 13 May 2007 20:26:46 +0000 |
| Subject: | Re: Re: 1 class = 1 file? | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-46751@lists.php.net to get a copy of this message | ||
Hi,
till wrote:
I thought I read this somewhere in the CS when I started working on my package. I also remember someone reminded me to put my Exception into a seperate file. Maybe that was even you, Mark? ;-)Right, it was me and it was the (non-existing) rule that I thought about.
IMO and for clarity, it's one class per file. Having too many exceptions to the rule just weakens the "standard". And maybe - if it's not hidden somewhere already - this should be added to the docs.Well, the rule Lukas, David and (later also) I were talking about makes sense IMHO. Only internally used classes would be put together with other classes, public classes would still go into new files. Exception classes are public and used by user code, and would therefore also go into a new file. If you want to have a written rule somewhere in the docs, you should send an email to the PEAR Group. Adding a short paragraph to the docs would be easy, but there needs to be a decision about the rule first. Regards, Mark -- http://www.markwiesemann.eu