Light PSR-0 compliant autoloader for PHP5.3+ namespaces and older PEAR-style classes.

Installs: 3 704

Dependents: 2

Suggesters: 0

Stars: 5

Watchers: 1

Forks: 0

Open Issues: 0


1.0.0 2013-01-10 23:17 UTC


Apix Autoloader is a light PSR-0 compliant autoloader which can autoload both PHP5.3 namespaces and older PEAR-style classes.

Basic usage

  • At its most basic, it will autoload PSR-0 complient class names in the current include-path:

          require '/path_to/Apix/Autoloader.php';
  • If you want to add some paths to the include-path:

          require '/path_to/Apix/Autoloader.php';
          $prepend = array('path/to/libs', 'path/to/vendor'); // paths to prepend
          $append  = array('path/to/last/dir');               // paths to append
          Apix\Autoloader::init($prepend, $append);

Advanced usage

      require '/path_to/Apix/Autoloader.php';

      $loader = new Apix\Autoloader;

      $loader->register(true);  // True to take precedence on registered autoloaders.
                                // False (the default) to follow the stack order.


  • If you are creating a component that relies on Apix Autoloader locally:

    • either update your composer.json file:

        "require": {
          "apix/autoloader": "1.0.*"
    • or update your package.xml file as follow:

  • For a system-wide installation, use PEAR as follow:

    sudo pear channel-discover pear.ouarz.net
    sudo pear install --alldeps ouarz/apix_autoloader

Checkout pear.ouarz.net for more details.


Apix Autoloader is licensed under the New BSD license -- see the LICENSE.txt for the full license details.