Compare commits

...

1 Commits
3.0.4 ... 3.0.5

Author SHA1 Message Date
508c25c111 more changes to support composer usage 2024-08-09 02:24:28 -04:00
6 changed files with 141 additions and 145 deletions

View File

@ -13,11 +13,12 @@ namespace TheTempusProject\Classes;
use TheTempusProject\Bedrock\Classes\Controller as BedrockController; use TheTempusProject\Bedrock\Classes\Controller as BedrockController;
use TheTempusProject\Houdini\Classes\Template; use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Houdini\Classes\Pagination; use TheTempusProject\Bedrock\Classes\Pagination;
use TheTempusProject\TheTempusProject as App; use TheTempusProject\TheTempusProject as App;
use TheTempusProject\Models\User; use TheTempusProject\Models\User;
use TheTempusProject\Models\Sessions; use TheTempusProject\Models\Sessions;
use TheTempusProject\Bedrock\Functions\Token; use TheTempusProject\Bedrock\Functions\Token;
use TheTempusProject\Houdini\Classes\Components;
class Controller extends BedrockController { class Controller extends BedrockController {
public static $user; public static $user;

View File

@ -3,131 +3,133 @@
if ( ! defined( 'APP_ROOT_DIRECTORY' ) ) { if ( ! defined( 'APP_ROOT_DIRECTORY' ) ) {
define( 'APP_ROOT_DIRECTORY', dirname( __DIR__ ) . DIRECTORY_SEPARATOR ); // need to verify define( 'APP_ROOT_DIRECTORY', dirname( __DIR__ ) . DIRECTORY_SEPARATOR ); // need to verify
} }
define( 'APP_DIRECTORY', APP_ROOT_DIRECTORY . 'app' . DIRECTORY_SEPARATOR ); define( 'APP_DIRECTORY', APP_ROOT_DIRECTORY . 'app' . DIRECTORY_SEPARATOR );
// Directories // Directories
define( 'CSS_DIRECTORY', APP_ROOT_DIRECTORY . 'css' . DIRECTORY_SEPARATOR ); define( 'CSS_DIRECTORY', APP_ROOT_DIRECTORY . 'css' . DIRECTORY_SEPARATOR );
define( 'IMAGE_DIRECTORY', APP_ROOT_DIRECTORY . 'images' . DIRECTORY_SEPARATOR ); define( 'IMAGE_DIRECTORY', APP_ROOT_DIRECTORY . 'images' . DIRECTORY_SEPARATOR );
define( 'JAVASCRIPT_DIRECTORY', APP_ROOT_DIRECTORY . 'js' . DIRECTORY_SEPARATOR ); define( 'JAVASCRIPT_DIRECTORY', APP_ROOT_DIRECTORY . 'js' . DIRECTORY_SEPARATOR );
define( 'HTACCESS_LOCATION', APP_ROOT_DIRECTORY . '.htaccess' ); define( 'HTACCESS_LOCATION', APP_ROOT_DIRECTORY . '.htaccess' );
if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
define( 'CONFIG_DIRECTORY', APP_DIRECTORY . 'config' . DIRECTORY_SEPARATOR ); define( 'CONFIG_DIRECTORY', APP_DIRECTORY . 'config' . DIRECTORY_SEPARATOR );
define( 'PLUGIN_DIRECTORY', APP_DIRECTORY . 'plugins' . DIRECTORY_SEPARATOR ); }
define( 'MODEL_DIRECTORY', APP_DIRECTORY . 'models' . DIRECTORY_SEPARATOR ); define( 'PLUGIN_DIRECTORY', APP_DIRECTORY . 'plugins' . DIRECTORY_SEPARATOR );
define( 'CONTROLLER_DIRECTORY', APP_DIRECTORY . 'controllers' . DIRECTORY_SEPARATOR ); define( 'MODEL_DIRECTORY', APP_DIRECTORY . 'models' . DIRECTORY_SEPARATOR );
define( 'ADMIN_CONTROLLER_DIRECTORY', CONTROLLER_DIRECTORY. 'admin' . DIRECTORY_SEPARATOR ); define( 'CONTROLLER_DIRECTORY', APP_DIRECTORY . 'controllers' . DIRECTORY_SEPARATOR );
define( 'API_CONTROLLER_DIRECTORY', CONTROLLER_DIRECTORY. 'api' . DIRECTORY_SEPARATOR ); define( 'ADMIN_CONTROLLER_DIRECTORY', CONTROLLER_DIRECTORY. 'admin' . DIRECTORY_SEPARATOR );
define( 'API_CONTROLLER_DIRECTORY', CONTROLLER_DIRECTORY. 'api' . DIRECTORY_SEPARATOR );
// Files // Files
define( 'PERMISSIONS_JSON', CONFIG_DIRECTORY . 'permissions.json' ); define( 'PERMISSIONS_JSON', CONFIG_DIRECTORY . 'permissions.json' );
define( 'PREFERENCES_JSON', CONFIG_DIRECTORY . 'preferences.json' ); define( 'PREFERENCES_JSON', CONFIG_DIRECTORY . 'preferences.json' );
define( 'INSTALL_JSON_LOCATION', CONFIG_DIRECTORY . 'install.json' ); define( 'INSTALL_JSON_LOCATION', CONFIG_DIRECTORY . 'install.json' );
define( 'INSTALLER_LOCATION', APP_ROOT_DIRECTORY . 'install.php' ); define( 'INSTALLER_LOCATION', APP_ROOT_DIRECTORY . 'install.php' );
// Other // Other
define( 'PLUGINS_ENABLED', true ); define( 'PLUGINS_ENABLED', true );
define( 'INSTALL_STATUS_NOT_REQUIRED', 'Not Required' ); define( 'INSTALL_STATUS_NOT_REQUIRED', 'Not Required' );
define( 'INSTALL_STATUS_NOT_FOUND', 'Not Found' ); define( 'INSTALL_STATUS_NOT_FOUND', 'Not Found' );
define( 'INSTALL_STATUS_PARTIALLY_INSTALLED', 'Partially Installed' ); define( 'INSTALL_STATUS_PARTIALLY_INSTALLED', 'Partially Installed' );
define( 'INSTALL_STATUS_NOT_INSTALLED', 'Not Installed' ); define( 'INSTALL_STATUS_NOT_INSTALLED', 'Not Installed' );
define( 'INSTALL_STATUS_INSTALLED', 'Installed' ); define( 'INSTALL_STATUS_INSTALLED', 'Installed' );
define( 'INSTALL_STATUS_UNINSTALLED', 'Uninstalled' ); define( 'INSTALL_STATUS_UNINSTALLED', 'Uninstalled' );
define( 'INSTALL_STATUS_SUCCESS', 'Success' ); define( 'INSTALL_STATUS_SUCCESS', 'Success' );
define( 'INSTALL_STATUS_SKIPPED', 'Skipped' ); define( 'INSTALL_STATUS_SKIPPED', 'Skipped' );
define( 'INSTALL_STATUS_FAIL', 'Failed' ); define( 'INSTALL_STATUS_FAIL', 'Failed' );
define( 'MODEL_INSTALL_FLAGS', [ 'installTable', 'installPermissions', 'installConfigs', 'installResources', 'installPreferences' ] ); define( 'MODEL_INSTALL_FLAGS', [ 'installTable', 'installPermissions', 'installConfigs', 'installResources', 'installPreferences' ] );
define( 'PLUGIN_INSTALL_FLAGS', [ 'models_installed', 'permissions_installed', 'configs_installed', 'resources_installed', 'preferences_installed' ] ); define( 'PLUGIN_INSTALL_FLAGS', [ 'models_installed', 'permissions_installed', 'configs_installed', 'resources_installed', 'preferences_installed' ] );
# Tempus Debugger # Tempus Debugger
define( 'CANARY_SECURE_HASH', 'd73ed7591a30f0ca7d686a0e780f0d05' ); define( 'CANARY_SECURE_HASH', 'd73ed7591a30f0ca7d686a0e780f0d05' );
# Tempus Project Core # Tempus Project Core
// Check // Check
define( 'MINIMUM_PHP_VERSION', 8.1); define( 'MINIMUM_PHP_VERSION', 8.1);
// Cookies // Cookies
define( 'DEFAULT_COOKIE_PREFIX', 'TP_'); define( 'DEFAULT_COOKIE_PREFIX', 'TP_');
// Debug // Debug
define( 'CANARY_DEBUG_LEVEL_ERROR', 'error' ); define( 'CANARY_DEBUG_LEVEL_ERROR', 'error' );
define( 'CANARY_DEBUG_LEVEL_WARN', 'warn' ); define( 'CANARY_DEBUG_LEVEL_WARN', 'warn' );
define( 'CANARY_DEBUG_LEVEL_INFO', 'info' ); define( 'CANARY_DEBUG_LEVEL_INFO', 'info' );
define( 'CANARY_DEBUG_LEVEL_LOG', 'log' ); define( 'CANARY_DEBUG_LEVEL_LOG', 'log' );
define( 'CANARY_DEBUG_LEVEL_DEBUG', 'debug' ); define( 'CANARY_DEBUG_LEVEL_DEBUG', 'debug' );
define( 'CANARY_DEBUG_TO_FILE_LEVEL', CANARY_DEBUG_LEVEL_INFO ); define( 'CANARY_DEBUG_TO_FILE_LEVEL', CANARY_DEBUG_LEVEL_INFO );
define( 'CANARY_ENABLED', true ); define( 'CANARY_ENABLED', true );
define( 'DEBUG_EMAIL', 'webmaster@' . $_SERVER['HTTP_HOST'] ); define( 'DEBUG_EMAIL', 'webmaster@' . $_SERVER['HTTP_HOST'] );
define( 'HERMES_REDIRECTS_ENABLED', true ); define( 'HERMES_REDIRECTS_ENABLED', true );
define( 'RENDERING_ENABLED', true ); define( 'RENDERING_ENABLED', true );
define( 'CANARY_TRACE_ENABLED', false ); define( 'CANARY_TRACE_ENABLED', false );
define( 'CANARY_DEBUG_TO_CONSOLE', false ); define( 'CANARY_DEBUG_TO_CONSOLE', false );
define( 'CANARY_DEBUG_TO_FILE', true ); define( 'CANARY_DEBUG_TO_FILE', true );
// Directories // Directories
if ( ! defined( 'VENDOR_DIRECTORY' ) ) { if ( ! defined( 'VENDOR_DIRECTORY' ) ) {
define( 'VENDOR_DIRECTORY', APP_ROOT_DIRECTORY . 'vendor' . DIRECTORY_SEPARATOR ); define( 'VENDOR_DIRECTORY', APP_ROOT_DIRECTORY . 'vendor' . DIRECTORY_SEPARATOR );
} }
if ( is_dir( VENDOR_DIRECTORY . 'thetempusproject' )) { if ( is_dir( VENDOR_DIRECTORY . 'thetempusproject' )) {
define( 'TP_VENDOR_DIRECTORY', VENDOR_DIRECTORY . 'thetempusproject' . DIRECTORY_SEPARATOR ); define( 'TP_VENDOR_DIRECTORY', VENDOR_DIRECTORY . 'thetempusproject' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( VENDOR_DIRECTORY . 'TheTempusProject' )) { } elseif ( is_dir( VENDOR_DIRECTORY . 'TheTempusProject' )) {
define( 'TP_VENDOR_DIRECTORY', VENDOR_DIRECTORY . 'TheTempusProject' . DIRECTORY_SEPARATOR ); define( 'TP_VENDOR_DIRECTORY', VENDOR_DIRECTORY . 'TheTempusProject' . DIRECTORY_SEPARATOR );
} else { } else {
define( 'TP_VENDOR_DIRECTORY', VENDOR_DIRECTORY); define( 'TP_VENDOR_DIRECTORY', VENDOR_DIRECTORY);
} }
# Bedrock # Bedrock
if ( is_dir( TP_VENDOR_DIRECTORY . 'tempusprojectcore' )) { if ( is_dir( TP_VENDOR_DIRECTORY . 'tempusprojectcore' )) {
define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'tempusprojectcore' . DIRECTORY_SEPARATOR ); define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'tempusprojectcore' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'TempusProjectCore' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'TempusProjectCore' )) {
define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'TempusProjectCore' . DIRECTORY_SEPARATOR ); define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'TempusProjectCore' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'bedrock' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'bedrock' )) {
define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'bedrock' . DIRECTORY_SEPARATOR ); define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'bedrock' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Bedrock' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Bedrock' )) {
define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Bedrock' . DIRECTORY_SEPARATOR ); define( 'BEDROCK_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Bedrock' . DIRECTORY_SEPARATOR );
} }
if ( is_dir( BEDROCK_ROOT_DIRECTORY . 'config' )) { if ( is_dir( BEDROCK_ROOT_DIRECTORY . 'config' )) {
define( 'BEDROCK_CONFIG_DIRECTORY', BEDROCK_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR ); define( 'BEDROCK_CONFIG_DIRECTORY', BEDROCK_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR );
} }
# Canary # Canary
if ( is_dir( TP_VENDOR_DIRECTORY . 'tempusdebugger' )) { if ( is_dir( TP_VENDOR_DIRECTORY . 'tempusdebugger' )) {
define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'tempusdebugger' . DIRECTORY_SEPARATOR ); define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'tempusdebugger' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'TempusDebugger' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'TempusDebugger' )) {
define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'TempusDebugger' . DIRECTORY_SEPARATOR ); define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'TempusDebugger' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'canary' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'canary' )) {
define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'canary' . DIRECTORY_SEPARATOR ); define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'canary' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Canary' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Canary' )) {
define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Canary' . DIRECTORY_SEPARATOR ); define( 'CANARY_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Canary' . DIRECTORY_SEPARATOR );
} }
if ( is_dir( CANARY_ROOT_DIRECTORY . 'config' )) { if ( is_dir( CANARY_ROOT_DIRECTORY . 'config' )) {
define( 'CANARY_CONFIG_DIRECTORY', CANARY_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR ); define( 'CANARY_CONFIG_DIRECTORY', CANARY_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR );
} }
# Hermes # Hermes
if ( is_dir( TP_VENDOR_DIRECTORY . 'hermes' )) { if ( is_dir( TP_VENDOR_DIRECTORY . 'hermes' )) {
define( 'HERMES_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'hermes' . DIRECTORY_SEPARATOR ); define( 'HERMES_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'hermes' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Hermes' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Hermes' )) {
define( 'HERMES_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Hermes' . DIRECTORY_SEPARATOR ); define( 'HERMES_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Hermes' . DIRECTORY_SEPARATOR );
} }
if ( is_dir( HERMES_ROOT_DIRECTORY . 'config' )) { if ( is_dir( HERMES_ROOT_DIRECTORY . 'config' )) {
define( 'HERMES_CONFIG_DIRECTORY', HERMES_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR ); define( 'HERMES_CONFIG_DIRECTORY', HERMES_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR );
} }
# Houdini # Houdini
if ( is_dir( TP_VENDOR_DIRECTORY . 'houdini' )) { if ( is_dir( TP_VENDOR_DIRECTORY . 'houdini' )) {
define( 'HOUDINI_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'houdini' . DIRECTORY_SEPARATOR ); define( 'HOUDINI_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'houdini' . DIRECTORY_SEPARATOR );
} elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Houdini' )) { } elseif ( is_dir( TP_VENDOR_DIRECTORY . 'Houdini' )) {
define( 'HOUDINI_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Houdini' . DIRECTORY_SEPARATOR ); define( 'HOUDINI_ROOT_DIRECTORY', TP_VENDOR_DIRECTORY . 'Houdini' . DIRECTORY_SEPARATOR );
} }
if ( is_dir( HOUDINI_ROOT_DIRECTORY . 'config' )) { if ( is_dir( HOUDINI_ROOT_DIRECTORY . 'config' )) {
define( 'HOUDINI_CONFIG_DIRECTORY', HOUDINI_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR ); define( 'HOUDINI_CONFIG_DIRECTORY', HOUDINI_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR );
} }
// Shared Directories // Shared Directories
define( 'BIN_DIRECTORY', APP_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR ); define( 'BIN_DIRECTORY', APP_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR );
define( 'VIEW_DIRECTORY', APP_DIRECTORY . 'views' . DIRECTORY_SEPARATOR ); define( 'VIEW_DIRECTORY', APP_DIRECTORY . 'views' . DIRECTORY_SEPARATOR );
define( 'ERRORS_DIRECTORY', VIEW_DIRECTORY . 'errors' . DIRECTORY_SEPARATOR ); define( 'ERRORS_DIRECTORY', VIEW_DIRECTORY . 'errors' . DIRECTORY_SEPARATOR );
define( 'CLASSES_DIRECTORY', APP_DIRECTORY . 'classes' . DIRECTORY_SEPARATOR ); define( 'CLASSES_DIRECTORY', APP_DIRECTORY . 'classes' . DIRECTORY_SEPARATOR );
define( 'FUNCTIONS_DIRECTORY', APP_DIRECTORY . 'functions' . DIRECTORY_SEPARATOR ); define( 'FUNCTIONS_DIRECTORY', APP_DIRECTORY . 'functions' . DIRECTORY_SEPARATOR );
define( 'RESOURCES_DIRECTORY', APP_DIRECTORY . 'resources' . DIRECTORY_SEPARATOR ); define( 'RESOURCES_DIRECTORY', APP_DIRECTORY . 'resources' . DIRECTORY_SEPARATOR );
define( 'TEMPLATE_DIRECTORY', APP_DIRECTORY . 'templates' . DIRECTORY_SEPARATOR ); define( 'TEMPLATE_DIRECTORY', APP_DIRECTORY . 'templates' . DIRECTORY_SEPARATOR );
define( 'UPLOAD_DIRECTORY', APP_ROOT_DIRECTORY . 'uploads' . DIRECTORY_SEPARATOR ); define( 'UPLOAD_DIRECTORY', APP_ROOT_DIRECTORY . 'uploads' . DIRECTORY_SEPARATOR );
define( 'IMAGE_UPLOAD_DIRECTORY', UPLOAD_DIRECTORY . 'images' . DIRECTORY_SEPARATOR ); define( 'IMAGE_UPLOAD_DIRECTORY', UPLOAD_DIRECTORY . 'images' . DIRECTORY_SEPARATOR );
// Files // Files
define( 'COMPOSER_JSON_LOCATION', APP_ROOT_DIRECTORY . 'composer.json' ); define( 'COMPOSER_JSON_LOCATION', APP_ROOT_DIRECTORY . 'composer.json' );
define( 'COMPOSER_LOCK_LOCATION', APP_ROOT_DIRECTORY . 'composer.lock' ); define( 'COMPOSER_LOCK_LOCATION', APP_ROOT_DIRECTORY . 'composer.lock' );
define( 'CONFIG_JSON', CONFIG_DIRECTORY . 'config.json' ); define( 'CONFIG_JSON', CONFIG_DIRECTORY . 'config.json' );
// Other // Other
define( 'EMAIL_FROM_EMAIL', 'noreply@localohost.com' ); define( 'EMAIL_FROM_EMAIL', 'noreply@localohost.com' );
// Sessions // Sessions
define( 'DEFAULT_SESSION_PREFIX', 'TP_' ); define( 'DEFAULT_SESSION_PREFIX', 'TP_' );
// Token // Token
define( 'DEFAULT_TOKEN_NAME', 'TP_SESSION_TOKEN' ); define( 'DEFAULT_TOKEN_NAME', 'TP_SESSION_TOKEN' );
# Tell the app; all constants have been loaded # Tell the app; all constants have been loaded
define( 'TEMPUS_PROJECT_CONSTANTS_LOADED', true ); define( 'TEMPUS_PROJECT_CONSTANTS_LOADED', true );

View File

@ -21,7 +21,7 @@ use TheTempusProject\Houdini\Classes\Filters;
use TheTempusProject\Models\Calendars; use TheTempusProject\Models\Calendars;
use TheTempusProject\Bedrock\Classes\CustomException; use TheTempusProject\Bedrock\Classes\CustomException;
use TheTempusProject\Bedrock\Functions\Date; use TheTempusProject\Bedrock\Functions\Date;
use TheTempusProject\Houdini\Classes\Pagination; use TheTempusProject\Bedrock\Classes\Pagination;
class Events extends DatabaseModel { class Events extends DatabaseModel {
public $tableName = 'events'; public $tableName = 'events';

View File

@ -16,8 +16,14 @@ use TheTempusProject\Hermes\Classes\Autoloader;
use TheTempusProject\Houdini\Classes\Template; use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Houdini\Classes\Views; use TheTempusProject\Houdini\Classes\Views;
// Basic constants needed for loading files
define( 'APP_ROOT_DIRECTORY', dirname( __DIR__ ) . DIRECTORY_SEPARATOR ); define( 'APP_ROOT_DIRECTORY', dirname( __DIR__ ) . DIRECTORY_SEPARATOR );
define( 'VENDOR_DIRECTORY', APP_ROOT_DIRECTORY . 'vendor' . DIRECTORY_SEPARATOR ); define( 'CONFIG_DIRECTORY', APP_ROOT_DIRECTORY . 'app' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR );
// App Constants
if ( ! defined( 'TEMPUS_PROJECT_CONSTANTS_LOADED' ) ) {
require_once CONFIG_DIRECTORY . 'constants.php';
}
// Determine which autoloader to sue // Determine which autoloader to sue
if ( file_exists( VENDOR_DIRECTORY . 'autoload.php' ) ) { if ( file_exists( VENDOR_DIRECTORY . 'autoload.php' ) ) {
@ -99,7 +105,7 @@ function ttp_autoload() {
require_once( $currentFolder ); require_once( $currentFolder );
break; break;
case 'config': case 'config':
if (file_exists($currentFolder . 'constants.php')) { if ( file_exists( $currentFolder . 'constants.php' ) ) {
require_once( $currentFolder . 'constants.php' ); require_once( $currentFolder . 'constants.php' );
} }
break; break;
@ -110,22 +116,7 @@ function ttp_autoload() {
define('TEMPUS_PROJECT_AUTOLOADED', true); define('TEMPUS_PROJECT_AUTOLOADED', true);
} }
require_once 'bin/tempus_project.php';
function sideLoad() { function sideLoad() {
// Basic constants needed for loading files
if ( ! defined( 'APP_ROOT_DIRECTORY' ) ) {
define( 'APP_ROOT_DIRECTORY', dirname( __DIR__ ) . DIRECTORY_SEPARATOR );
}
if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
define( 'CONFIG_DIRECTORY', APP_ROOT_DIRECTORY . 'app' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR );
}
// App Constants
if ( ! defined( 'TEMPUS_PROJECT_CONSTANTS_LOADED' ) ) {
require_once CONFIG_DIRECTORY . 'constants.php';
}
// Hermes Constants // Hermes Constants
if ( ! defined( 'HERMES_CONSTANTS_LOADED' ) ) { if ( ! defined( 'HERMES_CONSTANTS_LOADED' ) ) {
if ( defined( 'HERMES_CONFIG_DIRECTORY' ) ) { if ( defined( 'HERMES_CONFIG_DIRECTORY' ) ) {
@ -180,3 +171,5 @@ function sideLoad() {
define( 'VENDOR_AUTOLOADED', false ); define( 'VENDOR_AUTOLOADED', false );
} }
require_once 'bin/tempus_project.php';

View File

@ -30,12 +30,12 @@
{ {
"files": "files":
[ [
"app/config/constants.php" "app/functions/forms.php",
"app/functions/common.php"
], ],
"classmap": "classmap":
[ [
"app/classes", "app/classes",
"app/functions",
"app/models" "app/models"
], ],
"psr-4": "psr-4":

18
composer.lock generated
View File

@ -60,11 +60,11 @@
}, },
{ {
"name": "thetempusproject/bedrock", "name": "thetempusproject/bedrock",
"version": "1.0.2", "version": "1.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.thetempusproject.com/the-tempus-project/bedrock", "url": "https://git.thetempusproject.com/the-tempus-project/bedrock",
"reference": "e3cf6beebb810e810b626678c391524bf6b3ddc5" "reference": "f80f7bed6bb6c399ce8ea2426ebe1e118cc30a9c"
}, },
"require": { "require": {
"php": ">=8.1.0", "php": ">=8.1.0",
@ -101,15 +101,15 @@
"framework", "framework",
"mvc" "mvc"
], ],
"time": "2024-08-09T04:55:48+00:00" "time": "2024-08-09T05:35:47+00:00"
}, },
{ {
"name": "thetempusproject/canary", "name": "thetempusproject/canary",
"version": "1.0.1", "version": "1.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.thetempusproject.com/the-tempus-project/canary", "url": "https://git.thetempusproject.com/the-tempus-project/canary",
"reference": "7746eb4af73f3eaba040d547904a251bbdab6977" "reference": "8dff31b4eefa3efeb9f81d2e6b6ef3e9f8c9f27b"
}, },
"require": { "require": {
"php": ">=8.1.0" "php": ">=8.1.0"
@ -144,7 +144,7 @@
"thetempusproject", "thetempusproject",
"tools" "tools"
], ],
"time": "2024-08-09T04:35:45+00:00" "time": "2024-08-09T06:18:45+00:00"
}, },
{ {
"name": "thetempusproject/hermes", "name": "thetempusproject/hermes",
@ -191,11 +191,11 @@
}, },
{ {
"name": "thetempusproject/houdini", "name": "thetempusproject/houdini",
"version": "1.0.3", "version": "1.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.thetempusproject.com/the-tempus-project/houdini", "url": "https://git.thetempusproject.com/the-tempus-project/houdini",
"reference": "3de98733ac32c0a6e1a3230cbccfa33263e399be" "reference": "34babdb2dc508450d14a0764bf81b032a6861a58"
}, },
"require": { "require": {
"php": ">=8.1.0", "php": ">=8.1.0",
@ -231,7 +231,7 @@
"thetempusproject", "thetempusproject",
"tools" "tools"
], ],
"time": "2024-08-09T04:56:06+00:00" "time": "2024-08-09T06:20:26+00:00"
}, },
{ {
"name": "twbs/bootstrap", "name": "twbs/bootstrap",