MediaWiki master
findClasses.php
Go to the documentation of this file.
1<?php
22require_once __DIR__ . '/Maintenance.php';
23
30class FindClasses extends Maintenance {
31
32 public function __construct() {
33 parent::__construct();
34 $this->addDescription( 'Finds the files containing classes via the autoloader.' );
35 }
36
37 public function execute() {
38 $input = file( 'php://stdin' );
39
40 foreach ( $input as $line ) {
41 $class = trim( $line );
42 $filename = AutoLoader::find( $class );
43 if ( $filename ) {
44 print "$filename\n";
45 } elseif ( $class ) {
46 print "#$class\n";
47 }
48 }
49 }
50}
51
52$maintClass = FindClasses::class;
53require_once RUN_MAINTENANCE_IF_MAIN;
Maintenance script for finding the files that contain classes.
__construct()
Default constructor.
execute()
Do the actual work.
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
addDescription( $text)
Set the description text.
$maintClass