|
MediaWiki REL1_39
|
Reads PHP code and returns the FQCN of every class defined within it. More...
Public Member Functions | |
| getClasses ( $code) | |
Protected Member Functions | |
| tryBeginExpect ( $token) | |
| Determine if $token begins the next expect sequence. | |
| tryEndExpect ( $token) | |
| Accepts the next token in an expect sequence. | |
Protected Attributes | |
| array null | $alias |
| Class alias with target/name fields. | |
| array | $classes |
| List of FQCN detected in this pass. | |
| string | $namespace = '' |
| Current namespace. | |
| array null | $startToken |
| Token from token_get_all() that started an expect sequence. | |
| array[] string[] | $tokens |
| List of tokens that are members of the current expect sequence. | |
Reads PHP code and returns the FQCN of every class defined within it.
Definition at line 24 of file ClassCollector.php.
| ClassCollector::getClasses | ( | $code | ) |
| string | $code | PHP code (including <?php) to detect class names from |
Definition at line 55 of file ClassCollector.php.
References $classes, $lines, $matches, tryBeginExpect(), and tryEndExpect().
|
protected |
Determine if $token begins the next expect sequence.
| array | $token |
Definition at line 103 of file ClassCollector.php.
Referenced by getClasses().
|
protected |
Accepts the next token in an expect sequence.
| array | string | $token |
Definition at line 131 of file ClassCollector.php.
References implodeTokens().
Referenced by getClasses().
|
protected |
Class alias with target/name fields.
Definition at line 49 of file ClassCollector.php.
|
protected |
List of FQCN detected in this pass.
Definition at line 34 of file ClassCollector.php.
Referenced by getClasses().
|
protected |
Current namespace.
Definition at line 29 of file ClassCollector.php.
|
protected |
Token from token_get_all() that started an expect sequence.
Definition at line 39 of file ClassCollector.php.
|
protected |
List of tokens that are members of the current expect sequence.
Definition at line 44 of file ClassCollector.php.