Merge branch 'main' into thetempusproject-com

This commit is contained in:
Joey Kimsey
2025-02-05 06:48:04 -05:00
108 changed files with 369 additions and 244 deletions

View File

@ -4,7 +4,7 @@
*
* Handles the application startup by requiring our autoloaders and loading constants.
*
* @version 3.0
* @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
@ -46,35 +46,38 @@ if ( ! VENDOR_AUTOLOADED && ! defined( 'TEMPUS_PROJECT_AUTOLOADED' ) ) {
function ttp_autoload() {
$Autoloader = new Autoloader;
$Autoloader->addNamespace(
APP_SPACE . '\Controllers',
CONTROLLER_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Controllers\Admin',
ADMIN_CONTROLLER_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Controllers\Api',
API_CONTROLLER_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Models',
MODEL_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Classes',
CLASSES_DIRECTORY,
false,
);
$Autoloader->includeFolder(FUNCTIONS_DIRECTORY);
$Autoloader->register();
// handle plugins
if ( ! VENDOR_AUTOLOADED ) {
$Autoloader->addNamespace(
APP_SPACE . '\Controllers',
CONTROLLER_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Controllers\Admin',
ADMIN_CONTROLLER_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Controllers\Api',
API_CONTROLLER_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Models',
MODEL_DIRECTORY,
false,
);
$Autoloader->addNamespace(
APP_SPACE . '\Classes',
CLASSES_DIRECTORY,
false,
);
$Autoloader->includeFolder(FUNCTIONS_DIRECTORY);
$Autoloader->register();
}
// Composer cannot handle autoloading plugins dynamically as they are added, so regardless, we need hermes for this part.
$pluginDirectoryArray = Plugin::getPluginDirectories();
foreach ( $pluginDirectoryArray as $pluginName => $locations ) {
foreach ( $locations as $location ) {

View File

@ -6,7 +6,7 @@
* In this file we initiate all models we will need, authenticate sessions, set
* template objects, and call appload to initialize the appropriate controller/method.
*
* @version 3.0
* @version 5.0.1
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]