This document itemizes changes to the coding standards that refer to loading of external files containing classes.
These have been extracted from the general PEAR2 Standards.
Documenting the location of external classes (classes not contained within a file) is an important problem to solve within PEAR2. There are two kinds of external classes:
This recommendation defines how to handle both
This document describes the coding standards and coding conventions for the new PEAR2 repository.
Packages that wish to be accepted into the PEAR2 repository must conform to these standards
File dependencies (required and optional) should be registered at the top of the file using documentation comments as well as with full import statements:
<?php /** * My Package * @uses PEAR2::SomeotherPackage in PEAR2/SomeotherPackage.php (package PEAR2::Someotherpackage must be installed) * @uses PEAR2::PackageName::Exception in PEAR2/PackageName/Exception.php * @package PEAR2_PackageName */ namespace PEAR2; use ::PEAR2::PackageName::Exception as Exception; use ::PEAR2::SomeotherPackage as PEAR2::SomeotherPackage; ?>
No Exceptions to this rule