ion/auto-loader

This package is abandoned and no longer maintained. The author suggests using the ion/autoloader package instead.

A small autoloading library, compatible with Composer, that allows you to customise your autoloading functionality.

v0.7.6+release/main 2021-10-29 13:48 UTC

README

License: LGPL v3

Auto-Loader is a small, Composer-compatible and customizable auto-loading library for PHP.

Why not Composer's Auto-loader?

The obvious question...

Composer's auto-loading capabilities are actually recommended and can be used along-side this library - however, in certain circumstances they can fall a bit short...

This library was created to address those very specific situations. For instance, let's consider a scenario where you would like to seperate your base source code from different source code bases that depend on different versions of PHP.

With composer, you're stuck with one base source code directory - with this library, you can specify multiple.

Features

  • Seperation of source directories and additional build directories.
  • Version management (just edit version.json or composer.json with SemVer compatible version data and you're good to go).
  • Class location caches (cached using PHP syntax - to take advantage of the PHP op-cache, if available).
  • PSR-0 and PSR-4.
  • Full control (you can turn features like debugging or caching on globally, or just for a single package).

Getting Started

As an included library, with Composer:

Make sure Composer is installed - if not, you can get it from here.

First, you need to add ion/auto-loader as a dependency in your composer.json file.

To use the current stable version, add the following to download it straight from here:

"require": {
    "php": ">=5.6",
    "ion/auto-loader": "^0.4.0",
}

To use the bleeding edge (development) version, add the following:

"require": {
    "php": ">=7.2",
    "ion/auto-loader": "dev-default",	
},
"repositories": {
    {
      "type": "hg",
      "url": "https://bitbucket.org/justusmeyer/auto-loader/"
    }
}

Then run the following in the root directory of your project:

php composer.phar install

As an included library, without Composer:

Download a packaged version (in .ZIP format), here

Unzip the package and make sure you include 'include.php,' like so (assuming you unzipped the package into the relative path 'includes/wp-helper'):

require_once( __DIR__ . '/includes/auto-loader/include.php' ); 

Prerequisites

  • Composer (optional)

Built With

  • Composer - Dependency Management
  • Phing - Used to generate custom builds for various target PHP versions (5.6, 7.0, 7.1)
  • NetBeans - IDE

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the LGPL-3.0 License - see the LICENSE.md file for details.