2 if ( php_sapi_name() != 'cli' ) exit;
4 $IP = dirname(__FILE__
) .'/..';
5 require( "$IP/includes/AutoLoader.php" );
6 $files = array_unique( $wgAutoloadLocalClasses );
8 foreach ( $files as $file ) {
9 if( function_exists( 'parsekit_compile_file' ) ){
10 $parseInfo = parsekit_compile_file( "$IP/$file" );
11 $classes = array_keys( $parseInfo['class_table'] );
13 $contents = file_get_contents( "$IP/$file" );
15 preg_match_all( '/\n\s*class\s+([a-zA-Z0-9_]+)/', $contents, $m, PREG_PATTERN_ORDER
);
18 foreach ( $classes as $class ) {
19 if ( !isset( $wgAutoloadLocalClasses[$class] ) ) {
20 //printf( "%-50s Unlisted, in %s\n", $class, $file );
21 echo " '$class' => '$file',\n";
22 } elseif ( $wgAutoloadLocalClasses[$class] !== $file ) {
23 echo "$class: Wrong file: found in $file, listed in " . $wgAutoloadLocalClasses[$class] . "\n";