Map-based autoloader across php and phar resources

⌈⌋ ⎇ branch:  Canonic Autoloader


Artifact [d924573af3]

Artifact d924573af30d04279bfa23549a20f2d846331172:

  • File manpage.1 — part of check-in [0f47a9ce94] at 2014-09-08 13:44:19 on branch trunk — Add minimum documentation. (user: mario size: 1713)

.\"
.TH shared.phar "0.3.3 - September 2014" "BSD/Linux" "User Manuals"
.SH NAME
shared.phar \- Canonic PHP Autoloader
.SH SYNOPSIS
.I php
.B shared.phar
.RB [ path ,
.IR ... ]
.SH DESCRIPTION
shared.phar is a map-based autoloader for
.B *.php
scripts and
.B *.phar
collections. It self-contains the generated class map, and
also prepares for function autoloading support (far-fetched
future, when php-dev gets a grip).
.P
.VS
By default it scans the directories beneath its location.
The primary installation thus
.I /usr/share/php
and all its contained includes.
.P
.I Not impemented:
future versions will allow to specify a list of directories
as arguments to include in the scanning process. Hereby
.IR ./ relative
path names will be kept relative to 
.B shared.phar
itself. While absolute
.IR / paths
are never transformed.
.SH FEATURES
.IP \(bu 2
Traverses any directory structure, but skips .hidden dirs,
while scanning *.php scripts.
.IP \(bu 2
Stores identifiers (classes, functions) case-insensitively
for consistency with PHP.
.IP \(bu 2
Phar collections are traversed as well, and references
stored with relative paths.
.SH PHP USAGE
Activating the autoloader within PHP applications is as simple as calling
.IP 
.BR include_once (
.I """shared.phar""
.RB ) ;
.P
Which will implictly load the contained classmap.
.SH ENVIRONMENT
Recognized environment variables (as set via
.IB ".htaccess " SetEnv
for instance) in webserver or CLI context.
.TP
.BR AUTOLOADER_UPDATE " (boolean)"
Will enable implicit classmap updates on missed identifier (class)
lookups. Advisable for development setups only.
.SH FORMAT
The default
.B shared.phar
package is a PKZIP archive.
.SH "SEE ALSO"
.BR php (1)
.BR phar (5)