App (class)
Class App
App is responsible for path management, class location and class loading.
Adding paths
You can add paths to the search indexes App uses to find classes using App::build()
. Adding additional controller paths for example would alter where CakePHP looks for controllers. This allows you to split your application up across the filesystem.
Packages
CakePHP is organized around the idea of packages, each class belongs to a package or folder where other classes reside. You can configure each package location in your application using App::build('APackage/SubPackage', $paths)
to inform the framework where should each class be loaded. Almost every class in the CakePHP framework can be swapped by your own compatible implementation. If you wish to use your own class instead of the classes the framework provides, just add the class to your libs folder mocking the directory location of where CakePHP expect