This library handles redirects, provides a common backbone for routing, and can handle autoloading in cases where composer is unavailable.

1.0.5 2025-02-02 23:22 UTC

This package is auto-updated.

Last update: 2025-03-02 23:29:10 UTC


README

Hermes is a small package to handle redirects, routing, and autoloading. This library id developed in conjunction with The Tempus Project.

Installation

To install, simply use the composer command:

php composer.phar require thetempusproject/hermes

composer require thetempusproject/hermes

Usage

Typical usage would be through including the package via composer.


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/.


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';
    }
}

Redirect::home();

Issues / Bugs / Contact

If anyone actually uses this library and runs into any issues, feel free to contact me and I'll look into it.

Joey Kimsey - Lead Developer

JoeyKimsey.com