diff options
Diffstat (limited to 'maintenance/checkAutoLoader.php')
-rw-r--r-- | maintenance/checkAutoLoader.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/maintenance/checkAutoLoader.php b/maintenance/checkAutoLoader.php new file mode 100644 index 00000000..c2909ef7 --- /dev/null +++ b/maintenance/checkAutoLoader.php @@ -0,0 +1,22 @@ +<?php +if ( php_sapi_name() != 'cli' ) exit; + +$IP = dirname(__FILE__) .'/..'; +require( "$IP/includes/AutoLoader.php" ); +$files = array_unique( AutoLoader::$localClasses ); + +foreach ( $files as $file ) { + $parseInfo = parsekit_compile_file( "$IP/$file" ); + $classes = array_keys( $parseInfo['class_table'] ); + foreach ( $classes as $class ) { + if ( !isset( AutoLoader::$localClasses[$class] ) ) { + //printf( "%-50s Unlisted, in %s\n", $class, $file ); + echo " '$class' => '$file',\n"; + } elseif ( AutoLoader::$localClasses[$class] !== $file ) { + echo "$class: Wrong file: found in $file, listed in " . AutoLoader::$localClasses[$class] . "\n"; + } + } + +} + + |