MediaWiki
master
findClasses.php
Go to the documentation of this file.
1
<?php
22
// @codeCoverageIgnoreStart
23
require_once __DIR__ .
'/Maintenance.php'
;
24
// @codeCoverageIgnoreEnd
25
32
class
FindClasses
extends
Maintenance
{
33
34
public
function
__construct
() {
35
parent::__construct();
36
$this->
addDescription
(
'Finds the files containing classes via the autoloader.'
);
37
}
38
39
public
function
execute
() {
40
$stdin = $this->
getStdin
();
41
42
while
( !feof( $stdin ) ) {
43
$line = fgets( $stdin );
44
if
( $line ===
false
) {
45
break
;
46
}
47
$class = trim( $line );
48
$filename = AutoLoader::find( $class );
49
if
( $filename ) {
50
$this->
output
(
"$filename\n"
);
51
} elseif ( $class ) {
52
$this->
output
(
"#$class\n"
);
53
}
54
}
55
}
56
}
57
58
// @codeCoverageIgnoreStart
59
$maintClass
= FindClasses::class;
60
require_once RUN_MAINTENANCE_IF_MAIN;
61
// @codeCoverageIgnoreEnd
FindClasses
Maintenance script for finding the files that contain classes.
Definition
findClasses.php:32
FindClasses\__construct
__construct()
Default constructor.
Definition
findClasses.php:34
FindClasses\execute
execute()
Do the actual work.
Definition
findClasses.php:39
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition
Maintenance.php:70
Maintenance\output
output( $out, $channel=null)
Throw some output to the user.
Definition
Maintenance.php:481
Maintenance\getStdin
getStdin( $len=null)
Return input from stdin.
Definition
Maintenance.php:453
Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition
Maintenance.php:331
$maintClass
$maintClass
Definition
findClasses.php:59
maintenance
findClasses.php
Generated on Sat Oct 5 2024 00:27:43 for MediaWiki by
1.10.0