mediawiki-extensions-Echo/scripts/gen-autoload.php
Matthew Flaschen 090169fec3 Fix autoloader for I3a426b92892f4c00cab33a13f6a717751120367c
That changes the signature.

Change-Id: I1dc9f0240ae4b27e51e170f31911fea4f5225625
2016-08-29 19:05:10 -04:00

33 lines
660 B
PHP

<?php
require_once __DIR__ . '/../../../includes/utils/AutoloadGenerator.php';
// @codingStandardsIgnoreStart
function main() {
// @codingStandardsIgnoreEnd
$base = dirname( __DIR__ );
$generator = new AutoloadGenerator( $base );
$dirs = array(
'includes',
'tests',
'maintenance',
);
foreach ( $dirs as $dir ) {
$generator->readDir( $base . '/' . $dir );
}
foreach ( glob( $base . '/*.php' ) as $file ) {
$generator->readFile( $file );
}
$target = $generator->getTargetFileInfo();
file_put_contents(
$target['filename'],
$generator->getAutoload( basename( __DIR__ ) . '/' . basename( __FILE__ ) )
);
echo "Done.\n\n";
}
main();