Admidio / admidio

Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.
https://www.admidio.org
GNU General Public License v2.0
314 stars 124 forks source link

Using Namespaces #209

Open ximex opened 8 years ago

ximex commented 8 years ago

To avoid conflicts with classnames of other libs and better logical structure we should use namespaces. https://secure.php.net/manual/en/language.namespaces.php

thomas-rcv commented 8 years ago

If we finished the API we should definitly use it to avoid trouble shooting. At the moment in my opinion it is not important. The only thing would be an issue if Admidio is implementet in a modern CMS, but we removed the classic theme ... so it is not really usefull

Fasse commented 3 years ago

A possible structure for namespaces:

classes\Core\Session. ...\Component  ...\AdmException. ..\Navigation. ...\Message. ...\Language
classes\Html\HtmlPage ...\HtmlTable. ...\HtmlForm. ...\Menu
classes\Modules\Modules. ...\ModuleDates
classes\Utils\StringUtils.  ...\FileSystemUtils
classes\Users\User. ...\UserImport.  ...\TableUserField

Where to add classes like Tablephotos , TableCategory or ListConfiguration?

After use of namespaces should we rename classes? e.g. AdmException to only Exception?

ximex commented 3 years ago

i think we should but all classes that extends TableAccess in the same directory. And to Exceptions. I think we should use more of the already defined exceptions: https://www.php.net/manual/en/class.exception.php