views:

37

answers:

2

Let's say we have several exception classes that extends exception. My question is, in order to proper organize our files, where should those classes be placed ?

i.e - Are they helper classes?

One on it's on file? Ok. Respecting naming conventions. Ok.

But then we group those files and in what folder should we put them? On a folder called Helper Classes?

You can named as you like, I realise that, I'm just trying to figure it out, if there is any rational about the place where we can put those classes.

Thanks in advance, MEM

+1  A: 

This kind of naming convention is pretty widespread:

http://framework.zend.com/manual/en/coding-standard.naming-conventions.html

Daniel Egeberg
@Daniel:I have edited my question. I'm asking for a folder. I have the file names and class names related etc... but I need to put them somewhere, and it's that folder name that I'm asking for. :) Thanks in advance.
MEM
@MEM: call the folder "bob" ----- it's just a name.
salathe
If you look on that page there are some examples: IE Zend/View/Helpers/FileName.php I would take it you want to put your classes inside of a "Helpers" folder.
Brad F Jacobs
@Salathe, Sir, Salathe. :) Ok. I must think on others as well. One day, they will look at my code, and if I have names like "bob" "fred" "Anna" ... I believe they will have a hard time to find them out. :pStill, I do get your point. So, those are not real helper classes are they? So I will add them somewhere near the validation classes. I will probably call that folder the incredible name of: "Exceptions".
MEM
+1  A: 

That depends how you use them. THe safest way is to keep each exception in its own file (this will enable use of spl_autoload().

Mchl
@Mchl: I have edited my question. I'm asking for a folder. I have the file names and class names related etc... but I need to put them somewhere, and it's that folder name that I'm asking for. :) Thanks in advance.
MEM
Again it's up to you, depending on how you use and load these classes.If you want to use autloading, all you need to do is make sure the folder they're in is in your include path.
Mchl
I see. I'm to newbie for auto-loading. :D I will call Exceptions.
MEM