Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
aba39575fa | |||
508c25c111 | |||
6cf4594622 |
@ -13,11 +13,12 @@ namespace TheTempusProject\Classes;
|
||||
|
||||
use TheTempusProject\Bedrock\Classes\Controller as BedrockController;
|
||||
use TheTempusProject\Houdini\Classes\Template;
|
||||
use TheTempusProject\Houdini\Classes\Pagination;
|
||||
use TheTempusProject\Bedrock\Classes\Pagination;
|
||||
use TheTempusProject\TheTempusProject as App;
|
||||
use TheTempusProject\Models\User;
|
||||
use TheTempusProject\Models\Sessions;
|
||||
use TheTempusProject\Bedrock\Functions\Token;
|
||||
use TheTempusProject\Houdini\Classes\Components;
|
||||
|
||||
class Controller extends BedrockController {
|
||||
public static $user;
|
||||
|
@ -1,19 +1,17 @@
|
||||
<?php
|
||||
if ( ! defined( 'APP_SPACE' ) ) {
|
||||
define( 'APP_SPACE', 'TheTempusProject' );
|
||||
}
|
||||
if ( ! defined( 'APP_ROOT_DIRECTORY' ) ) {
|
||||
define( 'APP_ROOT_DIRECTORY', dirname( __DIR__ ) . DIRECTORY_SEPARATOR ); // need to verify
|
||||
}
|
||||
if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
|
||||
define( 'CONFIG_DIRECTORY', APP_ROOT_DIRECTORY . 'app' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR );
|
||||
}
|
||||
// Directories
|
||||
define( 'APP_DIRECTORY', APP_ROOT_DIRECTORY . 'app' . DIRECTORY_SEPARATOR );
|
||||
// Directories
|
||||
define( 'CSS_DIRECTORY', APP_ROOT_DIRECTORY . 'css' . DIRECTORY_SEPARATOR );
|
||||
define( 'IMAGE_DIRECTORY', APP_ROOT_DIRECTORY . 'images' . DIRECTORY_SEPARATOR );
|
||||
define( 'JAVASCRIPT_DIRECTORY', APP_ROOT_DIRECTORY . 'js' . DIRECTORY_SEPARATOR );
|
||||
define( 'HTACCESS_LOCATION', APP_ROOT_DIRECTORY . '.htaccess' );
|
||||
if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
|
||||
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( 'CONTROLLER_DIRECTORY', APP_DIRECTORY . 'controllers' . DIRECTORY_SEPARATOR );
|
||||
@ -59,7 +57,9 @@ if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
|
||||
define( 'CANARY_DEBUG_TO_CONSOLE', false );
|
||||
define( 'CANARY_DEBUG_TO_FILE', true );
|
||||
// Directories
|
||||
if ( ! defined( 'VENDOR_DIRECTORY' ) ) {
|
||||
define( 'VENDOR_DIRECTORY', APP_ROOT_DIRECTORY . 'vendor' . DIRECTORY_SEPARATOR );
|
||||
}
|
||||
if ( is_dir( VENDOR_DIRECTORY . 'thetempusproject' )) {
|
||||
define( 'TP_VENDOR_DIRECTORY', VENDOR_DIRECTORY . 'thetempusproject' . DIRECTORY_SEPARATOR );
|
||||
} elseif ( is_dir( VENDOR_DIRECTORY . 'TheTempusProject' )) {
|
||||
|
@ -21,7 +21,7 @@ use TheTempusProject\Houdini\Classes\Filters;
|
||||
use TheTempusProject\Models\Calendars;
|
||||
use TheTempusProject\Bedrock\Classes\CustomException;
|
||||
use TheTempusProject\Bedrock\Functions\Date;
|
||||
use TheTempusProject\Houdini\Classes\Pagination;
|
||||
use TheTempusProject\Bedrock\Classes\Pagination;
|
||||
|
||||
class Events extends DatabaseModel {
|
||||
public $tableName = 'events';
|
||||
|
123
bin/autoload.php
123
bin/autoload.php
@ -17,80 +17,21 @@ use TheTempusProject\Houdini\Classes\Template;
|
||||
use TheTempusProject\Houdini\Classes\Views;
|
||||
|
||||
// Basic constants needed for loading files
|
||||
if ( ! defined( 'APP_SPACE' ) ) {
|
||||
define( 'APP_SPACE', __NAMESPACE__ );
|
||||
}
|
||||
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 );
|
||||
}
|
||||
define( 'APP_ROOT_DIRECTORY', dirname( __DIR__ ) . 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';
|
||||
}
|
||||
|
||||
// Hermes Constants
|
||||
if ( ! defined( 'HERMES_CONSTANTS_LOADED' ) ) {
|
||||
if ( defined( 'HERMES_CONFIG_DIRECTORY' ) ) {
|
||||
require_once HERMES_CONFIG_DIRECTORY . 'constants.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Bedrock Constants
|
||||
if ( ! defined( 'BEDROCK_CONSTANTS_LOADED' ) ) {
|
||||
if ( defined( 'BEDROCK_CONFIG_DIRECTORY' ) ) {
|
||||
require_once BEDROCK_CONFIG_DIRECTORY . 'constants.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Canary Constants
|
||||
if ( ! defined( 'CANARY_CONSTANTS_LOADED' ) ) {
|
||||
if ( defined( 'CANARY_CONFIG_DIRECTORY' ) ) {
|
||||
require_once CANARY_CONFIG_DIRECTORY . 'constants.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Require common functions
|
||||
require_once FUNCTIONS_DIRECTORY . 'common.php';
|
||||
|
||||
// Determine which autoloader to sue
|
||||
if ( file_exists( VENDOR_DIRECTORY . 'autoload.php' ) ) {
|
||||
// Composer Autoloader
|
||||
require_once VENDOR_DIRECTORY . 'autoload.php';
|
||||
define( 'VENDOR_AUTOLOADED', true );
|
||||
} else {
|
||||
// Hermes Autoloader (Autoloader)
|
||||
if ( ! defined( 'HERMES_AUTOLOADED' ) ) {
|
||||
if ( defined( 'HERMES_ROOT_DIRECTORY' ) ) {
|
||||
require_once HERMES_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
// Canary Autoloader (Debugging)
|
||||
if ( ! defined( 'CANARY_AUTOLOADED' ) ) {
|
||||
if ( defined( 'CANARY_ROOT_DIRECTORY' ) ) {
|
||||
require_once CANARY_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
// Bedrock Autoloader (Core Functionality)
|
||||
if ( ! defined( 'BEDROCK_AUTOLOADED' ) ) {
|
||||
if ( defined( 'BEDROCK_ROOT_DIRECTORY' ) ) {
|
||||
require_once BEDROCK_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
// Houdini Autoloader (Frontend Driver)
|
||||
if ( ! defined( 'HOUDINI_AUTOLOADED' ) ) {
|
||||
if ( defined( 'HOUDINI_ROOT_DIRECTORY' ) ) {
|
||||
require_once HOUDINI_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
// App Autoloader
|
||||
if ( file_exists( APP_DIRECTORY . 'autoload.php' ) ) {
|
||||
require_once APP_DIRECTORY . 'autoload.php';
|
||||
}
|
||||
define( 'VENDOR_AUTOLOADED', false );
|
||||
sideLoad();
|
||||
}
|
||||
|
||||
if ( class_exists( 'TheTempusProject\Hermes\Classes\Autoloader' ) && TEMPUS_PROJECT_CONSTANTS_LOADED ) {
|
||||
@ -164,7 +105,7 @@ function ttp_autoload() {
|
||||
require_once( $currentFolder );
|
||||
break;
|
||||
case 'config':
|
||||
if (file_exists($currentFolder . 'constants.php')) {
|
||||
if ( file_exists( $currentFolder . 'constants.php' ) ) {
|
||||
require_once( $currentFolder . 'constants.php' );
|
||||
}
|
||||
break;
|
||||
@ -175,4 +116,60 @@ function ttp_autoload() {
|
||||
define('TEMPUS_PROJECT_AUTOLOADED', true);
|
||||
}
|
||||
|
||||
function sideLoad() {
|
||||
// Hermes Constants
|
||||
if ( ! defined( 'HERMES_CONSTANTS_LOADED' ) ) {
|
||||
if ( defined( 'HERMES_CONFIG_DIRECTORY' ) ) {
|
||||
require_once HERMES_CONFIG_DIRECTORY . 'constants.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Bedrock Constants
|
||||
if ( ! defined( 'BEDROCK_CONSTANTS_LOADED' ) ) {
|
||||
if ( defined( 'BEDROCK_CONFIG_DIRECTORY' ) ) {
|
||||
require_once BEDROCK_CONFIG_DIRECTORY . 'constants.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Canary Constants
|
||||
if ( ! defined( 'CANARY_CONSTANTS_LOADED' ) ) {
|
||||
if ( defined( 'CANARY_CONFIG_DIRECTORY' ) ) {
|
||||
require_once CANARY_CONFIG_DIRECTORY . 'constants.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Require common functions
|
||||
require_once FUNCTIONS_DIRECTORY . 'common.php';
|
||||
|
||||
// Hermes Autoloader (Autoloader)
|
||||
if ( ! defined( 'HERMES_AUTOLOADED' ) ) {
|
||||
if ( defined( 'HERMES_ROOT_DIRECTORY' ) ) {
|
||||
require_once HERMES_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Canary Autoloader (Debugging)
|
||||
if ( ! defined( 'CANARY_AUTOLOADED' ) ) {
|
||||
if ( defined( 'CANARY_ROOT_DIRECTORY' ) ) {
|
||||
require_once CANARY_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Bedrock Autoloader (Core Functionality)
|
||||
if ( ! defined( 'BEDROCK_AUTOLOADED' ) ) {
|
||||
if ( defined( 'BEDROCK_ROOT_DIRECTORY' ) ) {
|
||||
require_once BEDROCK_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Houdini Autoloader (Frontend Driver)
|
||||
if ( ! defined( 'HOUDINI_AUTOLOADED' ) ) {
|
||||
if ( defined( 'HOUDINI_ROOT_DIRECTORY' ) ) {
|
||||
require_once HOUDINI_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
}
|
||||
}
|
||||
|
||||
define( 'VENDOR_AUTOLOADED', false );
|
||||
}
|
||||
|
||||
require_once 'bin/tempus_project.php';
|
||||
|
@ -28,16 +28,16 @@
|
||||
},
|
||||
"autoload":
|
||||
{
|
||||
"files":
|
||||
[
|
||||
"app/functions/forms.php",
|
||||
"app/functions/common.php"
|
||||
],
|
||||
"classmap":
|
||||
[
|
||||
"app/classes",
|
||||
"app/functions",
|
||||
"app/models"
|
||||
],
|
||||
"files":
|
||||
[
|
||||
"app/config/constants.php"
|
||||
],
|
||||
"psr-4":
|
||||
{
|
||||
"TheTempusProject\\Bedrock\\": "vendor/thetempusproject/bedrock",
|
||||
|
18
composer.lock
generated
18
composer.lock
generated
@ -60,11 +60,11 @@
|
||||
},
|
||||
{
|
||||
"name": "thetempusproject/bedrock",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.thetempusproject.com/the-tempus-project/bedrock",
|
||||
"reference": "e3cf6beebb810e810b626678c391524bf6b3ddc5"
|
||||
"reference": "79f21773c66a4b87e6a172cab3da23029c2441fd"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1.0",
|
||||
@ -101,15 +101,15 @@
|
||||
"framework",
|
||||
"mvc"
|
||||
],
|
||||
"time": "2024-08-09T04:55:48+00:00"
|
||||
"time": "2024-08-09T21:18:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "thetempusproject/canary",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.thetempusproject.com/the-tempus-project/canary",
|
||||
"reference": "7746eb4af73f3eaba040d547904a251bbdab6977"
|
||||
"reference": "289f35cf6b0bcacc4eaba056a11906426c6068fa"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1.0"
|
||||
@ -144,7 +144,7 @@
|
||||
"thetempusproject",
|
||||
"tools"
|
||||
],
|
||||
"time": "2024-08-09T04:35:45+00:00"
|
||||
"time": "2024-08-09T21:13:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "thetempusproject/hermes",
|
||||
@ -191,11 +191,11 @@
|
||||
},
|
||||
{
|
||||
"name": "thetempusproject/houdini",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.thetempusproject.com/the-tempus-project/houdini",
|
||||
"reference": "3de98733ac32c0a6e1a3230cbccfa33263e399be"
|
||||
"reference": "cbaba96d5ee2a3038b8c8b3e34c4b834de03b8f5"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1.0",
|
||||
@ -231,7 +231,7 @@
|
||||
"thetempusproject",
|
||||
"tools"
|
||||
],
|
||||
"time": "2024-08-09T04:56:06+00:00"
|
||||
"time": "2024-08-09T21:16:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "twbs/bootstrap",
|
||||
|
Reference in New Issue
Block a user