more changes to support composer usage
This commit is contained in:
@ -16,8 +16,14 @@ use TheTempusProject\Hermes\Classes\Autoloader;
|
||||
use TheTempusProject\Houdini\Classes\Template;
|
||||
use TheTempusProject\Houdini\Classes\Views;
|
||||
|
||||
// Basic constants needed for loading files
|
||||
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
|
||||
if ( file_exists( VENDOR_DIRECTORY . 'autoload.php' ) ) {
|
||||
@ -99,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;
|
||||
@ -110,22 +116,7 @@ function ttp_autoload() {
|
||||
define('TEMPUS_PROJECT_AUTOLOADED', true);
|
||||
}
|
||||
|
||||
require_once 'bin/tempus_project.php';
|
||||
|
||||
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
|
||||
if ( ! defined( 'HERMES_CONSTANTS_LOADED' ) ) {
|
||||
if ( defined( 'HERMES_CONFIG_DIRECTORY' ) ) {
|
||||
@ -179,4 +170,6 @@ function sideLoad() {
|
||||
}
|
||||
|
||||
define( 'VENDOR_AUTOLOADED', false );
|
||||
}
|
||||
}
|
||||
|
||||
require_once 'bin/tempus_project.php';
|
||||
|
Reference in New Issue
Block a user