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: 30317a4152bd4033cb1b38473ed68a83887d0688
Page Name:Canonic Autoloader
Date: 2014-02-13 05:06:14
Original User: mario
Mimetype:text/x-markdown
Parent: 5beaecce6d6cce1c79c5cf26c0c2e88953efa3d2 (diff)
Next 3faa122ccd6036bc588f86830aaf5041ef62e1d9
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.