Home > php-loader

php-loader

Php-loader is a project mainly written in ..., based on the View license.

Faster-than-light auto class loader

PHP-Loader (PHP 5.3)

Provides a class to automatically load classes given by nested directory structures. Does not need any file system checks, should be fast (O(1)).

Requirements

  • php-cache

Specs

  • Run the "run" script in the Specs directory. Expects "php-cache" on the same level as "php-loader"

Example

use CacheCache;
use LoaderLoader;

$cache = new Cache(..);
$loader = Loader::create('MainLoader', $cache)->add($pathTo, $namespace)->register();

new MyNamespaceMyClass; // Yay!

$loader->classExists('MyNamespaceMyClass'); // true

$loader->unregister();

See the Source or Specs for more

Previous:CityBus