MediaWiki  1.28.1
ClassCollector Class Reference

Reads PHP code and returns the FQCN of every class defined within it. More...

Collaboration diagram for ClassCollector:

Public Member Functions

 getClasses ($code)
 

Protected Member Functions

 implodeTokens ()
 Returns the string representation of the tokens within the current expect sequence and resets the sequence. More...
 
 tryBeginExpect ($token)
 Determine if $token begins the next expect sequence. More...
 
 tryEndExpect ($token)
 Accepts the next token in an expect sequence. More...
 

Protected Attributes

array $classes
 List of FQCN detected in this pass. More...
 
string $namespace = ''
 Current namespace. More...
 
array $startToken
 Token from token_get_all() that started an expect sequence. More...
 
array $tokens
 List of tokens that are members of the current expect sequence. More...
 

Detailed Description

Reads PHP code and returns the FQCN of every class defined within it.

Definition at line 294 of file AutoloadGenerator.php.

Member Function Documentation

ClassCollector::getClasses (   $code)

Definition at line 320 of file AutoloadGenerator.php.

References $code, as, classes, tryBeginExpect(), and tryEndExpect().

ClassCollector::implodeTokens ( )
protected

Returns the string representation of the tokens within the current expect sequence and resets the sequence.

Returns
string

Definition at line 392 of file AutoloadGenerator.php.

ClassCollector::tryBeginExpect (   $token)
protected

Determine if $token begins the next expect sequence.

Parameters
array$token

Definition at line 342 of file AutoloadGenerator.php.

Referenced by getClasses().

ClassCollector::tryEndExpect (   $token)
protected

Accepts the next token in an expect sequence.

Parameters
array

Definition at line 361 of file AutoloadGenerator.php.

Referenced by getClasses().

Member Data Documentation

array ClassCollector::$classes
protected

List of FQCN detected in this pass.

Definition at line 304 of file AutoloadGenerator.php.

string ClassCollector::$namespace = ''
protected

Current namespace.

Definition at line 299 of file AutoloadGenerator.php.

array ClassCollector::$startToken
protected

Token from token_get_all() that started an expect sequence.

Definition at line 309 of file AutoloadGenerator.php.

array ClassCollector::$tokens
protected

List of tokens that are members of the current expect sequence.

Definition at line 314 of file AutoloadGenerator.php.


The documentation for this class was generated from the following file: