MediaWiki
REL1_39
findClasses.php
Go to the documentation of this file.
1
<?php
22
require_once __DIR__ .
'/Maintenance.php'
;
23
30
class
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;
53
require_once RUN_MAINTENANCE_IF_MAIN;
AutoLoader\find
static find( $className)
Find the file containing the given class.
Definition
AutoLoader.php:167
FindClasses
Maintenance script for finding the files that contain classes.
Definition
findClasses.php:30
FindClasses\__construct
__construct()
Default constructor.
Definition
findClasses.php:32
FindClasses\execute
execute()
Do the actual work.
Definition
findClasses.php:37
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition
Maintenance.php:66
Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition
Maintenance.php:319
print
while(( $__line=Maintenance::readconsole()) !==false) print
Definition
eval.php:69
$maintClass
$maintClass
Definition
findClasses.php:52
$line
$line
Definition
mcc.php:119
maintenance
findClasses.php
Generated on Thu Nov 21 2024 05:25:00 for MediaWiki by
1.10.0