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

有帮助吗?

解决方案

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().

其他提示

This kind of naming convention is pretty widespread:

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top