blob: bec11a0de1d5d220b91c5e1e8e41b62177b07402 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
if ( PHP_SAPI != 'cli' ) {
die( "This script can only be run from the command line.\n" );
}
require_once __DIR__ . '/../includes/AutoLoader.php';
require_once __DIR__ . '/../includes/utils/AutoloadGenerator.php';
// Mediawiki installation directory
$base = dirname( __DIR__ );
$generator = new AutoloadGenerator( $base, 'local' );
$generator->setExcludePaths( array_values( AutoLoader::getAutoloadNamespaces() ) );
$generator->initMediaWikiDefault();
// Write out the autoload
$fileinfo = $generator->getTargetFileinfo();
file_put_contents(
$fileinfo['filename'],
$generator->getAutoload( 'maintenance/generateLocalAutoload.php' )
);
|