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: 5beaecce6d6cce1c79c5cf26c0c2e88953efa3d2
Page Name:Canonic Autoloader
Date: 2014-02-13 02:41:02
Original User: mario
Mimetype:text/x-markdown
Parent: c7546313269463e710a1ff5b4bddfe0d22cdab28 (diff)
Next 30317a4152bd4033cb1b38473ed68a83887d0688
Content

Features

shared.phar is a streets ahead PHP autoloader.

  • Self-contained in a single compressed phar
  • Based on a class map
  • Phar collections become first class citizens
    • Tokenizes plain *.php and phar://* includes 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 class structure.

And 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.