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
This commit is contained in:
Joey Kimsey
2025-02-02 07:14:21 -05:00
parent 247c3ee180
commit 4dbea74e5f
11 changed files with 59 additions and 167 deletions

View File

@ -1,4 +1,47 @@
# Hermes
Hermes is a small package to handle routing and autoloading designed in conjunction with [The Tempus Project](https://thetempusproject.com).
Hermes is a small package to handle redirects, routing, and autoloading. This library id developed in conjunction with [The Tempus Project](https://thetempusproject.com).
## Usage
Typical usage would be through including the package via composer.
```php
require_once VENDOR_DIRECTORY . 'autoload.php';
use TheTempusProject\Hermes\Functions\Redirect;
if ( ! App::$isAdmin ) {
return Redirect::home();
}
```
If you would like to use hermes own autoloading, simply inclode the constants file and the autoload file inside `/bin/`.
```php
use TheTempusProject\Hermes\Functions\Redirect;
// Hermes Constants
if ( ! defined( 'HERMES_CONSTANTS_LOADED' ) ) {
if ( defined( 'HERMES_CONFIG_DIRECTORY' ) ) {
require_once HERMES_CONFIG_DIRECTORY . 'constants.php';
}
}
// Hermes Autoloader (Autoloader)
if ( ! defined( 'HERMES_AUTOLOADED' ) ) {
if ( defined( 'HERMES_ROOT_DIRECTORY' ) ) {
require_once HERMES_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
}
}
if ( ! App::$isAdmin ) {
return Redirect::home();
}
```