
Improved readme removed contributing and code of conduct as they are basically just fluff when no one knows this repo exists removed composer.lock because this repo doesn't install anything to lock update copywrite to 2025 composer update to description comments
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* bin/autoload.php
|
|
*
|
|
* Uses the Hermes autoloader if it has been defined.
|
|
*
|
|
* @version 1.1
|
|
* @author Joey Kimsey <Joey@thetempusproject.com>
|
|
* @link https://TheTempusProject.com/libraries/Hermes
|
|
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
|
|
*/
|
|
namespace TheTempusProject\Hermes;
|
|
|
|
use TheTempusProject\Hermes\Classes\Autoloader;
|
|
|
|
if ( !defined( 'HERMES_ROOT_DIRECTORY' ) ) {
|
|
define( 'HERMES_ROOT_DIRECTORY', dirname( __DIR__ ) . DIRECTORY_SEPARATOR );
|
|
}
|
|
|
|
if ( ! defined('HERMES_CONFIG_DIRECTORY' ) ) {
|
|
define('HERMES_CONFIG_DIRECTORY', HERMES_ROOT_DIRECTORY . 'config' . DIRECTORY_SEPARATOR);
|
|
}
|
|
|
|
if ( ! defined('HERMES_CONSTANTS_LOADED' ) ) {
|
|
require_once HERMES_CONFIG_DIRECTORY . 'constants.php';
|
|
}
|
|
|
|
if ( ! class_exists( 'TheTempusProject\Hermes\Classes\Autoloader' ) ) {
|
|
require_once HERMES_CLASSES_DIRECTORY . 'autoloader.php';
|
|
}
|
|
|
|
$autoloader = new Autoloader;
|
|
$autoloader->setRootFolder( HERMES_ROOT_DIRECTORY );
|
|
$autoloader->addNamespace(
|
|
'TheTempusProject\Hermes\Classes',
|
|
'classes'
|
|
);
|
|
$autoloader->addNamespace(
|
|
'TheTempusProject\Hermes\Functions',
|
|
'functions'
|
|
);
|
|
$autoloader->register();
|
|
|
|
define( 'HERMES_AUTOLOADED', true );
|