Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A class map based autoloader for PHP

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README
A quick class map based autoloader solution.  Here's an example usage:

# Generate the map ahead of time
<?php
require_once 'Polaris/ClassMapGenerator.php';

$mapper = new Polaris_ClassMapGenerator();
$string = $mapper->generateMap();
$file   = fopen('map.txt', 'w+');
fwrite($file, $string);
fclose($file);
?>

# Initialize autoloader in your app
<?php

require_once 'Polaris/Autoload.php';

$autoload = new Polaris_Autoload('map.txt', __DIR__ . '/');
spl_autoload_register(array($autoload, 'autoload'));
?>
Something went wrong with that request. Please try again.