summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Echo/scripts/gen-autoload.php')
-rw-r--r--Echo/scripts/gen-autoload.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/Echo/scripts/gen-autoload.php b/Echo/scripts/gen-autoload.php
new file mode 100644
index 00000000..082e70a8
--- /dev/null
+++ b/Echo/scripts/gen-autoload.php
@@ -0,0 +1,30 @@
+<?php
+
+require_once __DIR__ . '/../../../includes/utils/AutoloadGenerator.php';
+
+function main() {
+ $base = dirname( __DIR__ );
+ $generator = new AutoloadGenerator( $base );
+ $dirs = array(
+ 'api',
+ 'controller',
+ 'formatters',
+ 'includes',
+ 'jobs',
+ 'model',
+ 'special',
+ 'tests',
+ );
+ foreach ( $dirs as $dir ) {
+ $generator->readDir( $base . '/' . $dir );
+ }
+ foreach ( glob( $base . '/*.php' ) as $file ) {
+ $generator->readFile( $file );
+ }
+
+ $generator->generateAutoload( basename( __DIR__ ) . '/' . basename( __FILE__ ) );
+
+ echo "Done.\n\n";
+}
+
+main();