Voting starts in March for the Drupal Association Board election.
The autoload module - is utility. It allows other modules to leverage
PHP5 class autoloading capabilities in a unified fashion.
- PHP 5.1.2 for Drupal 6 (unsupported)
- PHP 5.3.0 for Drupal 7
You do not need this module unless you are developing a module that makes use of classes or you are installing a module that depends on this one.
PLEASE, READ THE DOCUMENTATION BEFORE USAGE!
Let module know about the objects. To do this, go to module's
*.info file and configure the
autoload directive, were keys are subdirectories inside of the module directory and values - are namespace bases. As much as needed directories and namespace bases could be added by such way.
; All objects, namespace path of which starts from "CTools", ; will be searched inside of "<MODULE_PATH>/psr-0". autoload[psr-0] = CTools
; All objects, namespace path of which starts from "CTools\Plugins", ; will be searched inside of "<MODULE_PATH>/psr-4". autoload[psr-4] = CTools\Plugins
PSR-4 (single namespace)
; All objects, namespace path of which starts from "Example", ; will be searched inside of "<MODULE_PATH>/psr-4-single". autoload[psr-4-single] = Example\
1.x branch uses a manual info-hook. The
2.x branch includes a backport of the Drupal 7 self-learning registry as well as the info hook for backward compatibility.
Leveraging this module for Drupal 6 class-using modules, however, will make moving to Drupal 7 easier.
See the included README.txt file for information on how to use this module in your own modules.
NOTE: Remember to clear all caches in your module's hook_enable() if your module relies on autoload. Autoload information is cached and your class may not be found if the autoload cache is not cleared.
- Maintenance status: Actively maintained
- Development status: Maintenance fixes only
- Module categories: Developer, Utility
- Reported installs: 6,934 sites currently report using this module. View usage statistics.
- Downloads: 247,632
- Automated tests: Enabled
- Last modified: December 6, 2016
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.