Manual:$wgAutoloadClasses
From MediaWiki.org
| Extensions: $wgAutoloadClasses | |
|---|---|
| Array mapping class names to filenames, for autoloading. |
|
| Introduced in version: | 1.7.0 (r15031) |
| Removed in version: | still in use |
| Allowed Values: | (see below) |
| Default Value: | array() |
Other settings: Alphabetical | By Function
[edit] Details
Array mapping class names to filenames, for autoloading.
[edit] Example
Extension NewExtension is being implemented. The extension files are saved in the directory NewExtension, which is located in the extensions directory of the MediaWiki installation.
NewExtension is introducing a new class called NewClass, which is contained in the file NewClass.php
The proper settings for $wgAutoloadClasses is as follows:
$wgAutoloadClasses['NewClass'] = 'extensions/NewExtension/NewClass.php';