Map-based autoloader across php and phar resources

⌈⌋ ⎇ branch:  Canonic Autoloader


Update of "Canonic Autoloader"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 589b00f234b6c132e8e41e405ce7f05f19bdad6e
Page Name:Canonic Autoloader
Date: 2014-03-20 17:53:42
Original User: mario
Mimetype:text/x-markdown
Parent: f1f2fb989cb01c1b4a2a0ea18778da93d894ff2c (diff)
Next 42dfce74c30102b4c3398092fa3bc074c7dea48e
Content

Features

shared.phar is a streets ahead PHP autoloader.

  • Self-contained in a single compressed Phar ⎘ (but may also be split up).
  • Can be updated easily by invoking it from the command line, or implicitly.
  • Based on a class map, interprets identifiers case-insensitively (as PHP does).
  • Prepares rfc:function_autoloading userland support.
  • Phar collections become first class citizens, as both plain *.php scripts and phar://* includes are tokenized for identifier declarations.
  • Indifferent to PSR-0/4 constraints, works atop any legacy or custom directory scheme.
  • Is meant for /usr/share/php handling, but can be used project-locally just as well.
  • And for deployment is just copied along with the classpath.

Also it's public domain.

Usage

It can be utilized easily with:

 include_once("shared.phar");

And updated manually on the command line:

 php ./shared.phar

Or implicitly on development setups by declaring an AUTOLOADER_UPDATE environment variable.

Project

Development State
shared.phar is still in an early development stage.
Releases
Releases will be announced on http://freecode.com/projects/sharedphar
Packages
Debian packages are available via http://apt.include-once.org/