The following describes the mandatory requirements that must be adhered to for autoloader interoperability.
-
The term "class" refers to classes, interfaces, traits, and other similar structures.
-
A fully qualified class name MUST have the following form:
\<NamespaceName>(\<SubNamespaceName>)*\<ClassName>
-
The fully qualified class name MUST have a top-level namespace name.
-
The fully qualified class name MAY have one or more sub-namespace names.
-
The fully qualified class name MUST have a terminating class name.
-
-
When loading a file that defines a fully qualified class name from the file system ...
-
a contiguous series of one or more leading namespace names without the leading namespace separator (a "qualified name") in the fully qualified class name corresponds to a base directory;
-
the contiguous sub-namespace names after the "qualified name" correspond to a subdirectory within the base directory, where the namespace separators correspond to directory separators; and,
-
the terminating class name corresponds to a file name ending in
.php
.
-
-
Alphabetic characters in in the fully qualified class name may be of any combination of lower case and upper case. Underscores have no special meaning in any portion of the fully qualified class name.
Fully Qualified Class Name Qualified Name Base Directory File Path
---------------------------- ---------------- --------------------- ----------------------------------------
\Acme\Log\Writer\File_Writer Acme ./acme/lib/ ./acme/lib/Log/Writer/File_Writer.php
\Aura\Web\Response\Status Aura\Web /path/to/aura-web/src/ /path/to/aura-web/src/Response/Status.php
\Symfony\Core\Request Symfony\Core ./vendor/Symfony/Core/ ./vendor/Symfony/Core/Request.php`
\Zend\Acl Zend /usr/includes/Zend/ /usr/includes/Zend/Acl.php
Better still. I appreciate how you have adapted to the "will of the people" - what a long journey.
Like the format of the examples at the end - BTW, I'm not against examples, just know life is easier when things can be changed. Whatever works is great.
Looking forward to using it (officially). =)