more changes to support composer usage
This commit is contained in:
@ -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;
|
||||||
|
@ -9,7 +9,9 @@ if ( ! defined( 'APP_ROOT_DIRECTORY' ) ) {
|
|||||||
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( 'PLUGIN_DIRECTORY', APP_DIRECTORY . 'plugins' . DIRECTORY_SEPARATOR );
|
||||||
define( 'MODEL_DIRECTORY', APP_DIRECTORY . 'models' . DIRECTORY_SEPARATOR );
|
define( 'MODEL_DIRECTORY', APP_DIRECTORY . 'models' . DIRECTORY_SEPARATOR );
|
||||||
define( 'CONTROLLER_DIRECTORY', APP_DIRECTORY . 'controllers' . DIRECTORY_SEPARATOR );
|
define( 'CONTROLLER_DIRECTORY', APP_DIRECTORY . 'controllers' . DIRECTORY_SEPARATOR );
|
||||||
|
@ -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';
|
||||||
|
@ -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' ) ) {
|
||||||
@ -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';
|
||||||
|
@ -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
18
composer.lock
generated
@ -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",
|
||||||
|
Reference in New Issue
Block a user