Humblee's root folder structure consist of the following folders:
~/applicationthe bulk of all custom functionality developed for your app should live in the MVC structured subfolders of this directory, including custom controllers, models and template views.
~/humbleeconsist of the core files of the Humblee framework and it's integrated CMS. With the exception of your configuration environment files, you should not need to modify anything in this folder.
~/storageis used primarily by the "media manager" tool within the CMS to store uploaded files.
Humblee utilizes two different
~/.htaccess. This file's primary purpose is to redirect all traffic to the
~/publicfolder as if it were the root of the application. In doing so, this effectively makes the "~/application," "~/humblee" and "~/storage" folders inaccessible from the web. When navigating to your-site.tld/application/js/myfile.js the file being loaded actually lives at public/application/js/myfile.js.
~/public/index.phpis called and the rest of the URL is passed as a variable to that script.
~/public/index.php page is called, it, in turn, includes the file
~/humblee/init.php which initiates the rest of the Humblee framework and then loads the appropriate controller and calls the necessary method to load the given page specified by the URL.
A PHP switch() construct checks the passed URI and, if warranted, loads some predefined special controllers, such as the Humblee "admin" controller used by the CMS, the "users" controller for loading the sign in, authentication, and self-service user profile pages, and a "request" controller included in your
~/application/controllers folder that can be used for custom XHR (AJAX) calls you may wish to write.
By and large though, all traffic is routed to the
default controller. This controller checks user authorization, finds data about the given page, retrieves all the content associated with the page and then loads the appropriate site and page templates. It also returns the
~/application/views/404.php view and a 404 header if the URI is not associated with a page created through the CMS.
If you are creating a custom controller that does not rely on pages or content created through the CMS, you can route to the controller directly from the
However, if your custom controller will be used by page templates created through the CMS, you must register it through the "Templates Manager". See the "Register new page templates" section of the templates documentation for more information.