2014-09-26 21:42:19 +00:00
|
|
|
<?php
|
|
|
|
|
2014-11-19 17:16:20 +00:00
|
|
|
require_once __DIR__ . '/../../../includes/utils/AutoloadGenerator.php';
|
2014-09-26 21:42:19 +00:00
|
|
|
|
2015-10-29 11:37:24 +00:00
|
|
|
// @codingStandardsIgnoreStart
|
2014-09-26 21:42:19 +00:00
|
|
|
function main() {
|
2015-10-29 11:37:24 +00:00
|
|
|
// @codingStandardsIgnoreEnd
|
2014-09-26 21:42:19 +00:00
|
|
|
$base = dirname( __DIR__ );
|
|
|
|
$generator = new AutoloadGenerator( $base );
|
2016-12-05 18:51:07 +00:00
|
|
|
$dirs = [
|
2015-06-08 01:54:14 +00:00
|
|
|
'includes',
|
2014-10-24 23:10:47 +00:00
|
|
|
'tests',
|
2016-06-29 20:23:56 +00:00
|
|
|
'maintenance',
|
2016-12-05 18:51:07 +00:00
|
|
|
];
|
2014-09-26 21:42:19 +00:00
|
|
|
foreach ( $dirs as $dir ) {
|
|
|
|
$generator->readDir( $base . '/' . $dir );
|
|
|
|
}
|
|
|
|
foreach ( glob( $base . '/*.php' ) as $file ) {
|
|
|
|
$generator->readFile( $file );
|
|
|
|
}
|
|
|
|
|
2016-08-29 23:05:10 +00:00
|
|
|
$target = $generator->getTargetFileInfo();
|
|
|
|
|
|
|
|
file_put_contents(
|
|
|
|
$target['filename'],
|
|
|
|
$generator->getAutoload( basename( __DIR__ ) . '/' . basename( __FILE__ ) )
|
|
|
|
);
|
2014-09-26 21:42:19 +00:00
|
|
|
|
|
|
|
echo "Done.\n\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
main();
|