We have a composer installed in the project and autoload via psr-4 is connected.
Here is an example structure:
classes/ Import/ CsvFl.php XmlFl.php Export/ ClipBoard/ Main.php FileDir/ CsvFl.php XmlFl.php ...
Accordingly, the full name of the classes is:
VendorName\Import\CsvFl VendorName\Export\ClipBoard\Main ...
I would like to understand how to organize the structure of the class hierarchy of Exceptions.
Those. The base class BaseException
in my root classes
. And the general class for Export (ExportExcetion inherited from BaseException) in classes/Export
, etc.
In toga it turns out the following:
\VendorName\BaseException \VendorName\Export\ExportException \VendorName\Export\ClipBoard\ClipBoardException \VendorName\Export\ClipBoard\ClipBoardMainException.php ...
Tell me please, is this a normal practice? I am embarrassed, the fact that the names of the Neuspeys and general exceptions equally always begin. In practice, rarely met. Or how to properly organize the Hierarchy?