API: Document a level of 'all' in action=protect
[mediawiki.git] / maintenance / generateLocalAutoload.php
blob8b1d86df73972da631a5984e6b93d05992105f9c
1 <?php
3 if ( PHP_SAPI != 'cli' ) {
4 die( "This script can only be run from the command line.\n" );
7 require_once __DIR__ . '/../includes/utils/AutoloadGenerator.php';
9 // Mediawiki installation directory
10 $base = dirname( __DIR__ );
12 $generator = new AutoloadGenerator( $base, 'local' );
13 foreach ( [ 'includes', 'languages', 'maintenance', 'mw-config' ] as $dir ) {
14 $generator->readDir( $base . '/' . $dir );
16 foreach ( glob( $base . '/*.php' ) as $file ) {
17 $generator->readFile( $file );
20 // Write out the autoload
21 $generator->generateAutoload( 'maintenance/generateLocalAutoload.php' );