Classes folder - viames/pair GitHub Wiki
Pair framework: classes/ folder
In Pair projects, classes/ is used for application-level custom classes shared across modules.
Typical locations:
APPLICATION_PATH/classes/APPLICATION_PATH/modules/*/classes/
Autoloading (current approach)
Class loading is handled by Composer autoload (classmap/PSR-4), not by manual preload files.
In the current boilerplate, composer.json includes:
classes/modules/*/classes/
So classes placed there are discovered through Composer autoload.
Naming and organization
- Use one class per file.
- Keep file name aligned with class name (for example
Assets.php->Assets). - Use PascalCase for class names.
- Put module-specific classes in that module's
classes/folder. - Put cross-module/shared classes in root
classes/.
Legacy note
Older projects may reference classes/classLoader.php, but this is not part of the current recommended setup.
Form controls index
When navigating form controls, use this page as a shallow index and then move laterally via each page's See also.
Core form docs:
Text and identity inputs:
Choice controls:
Date and time controls:
Numeric and progress controls:
File/media controls: