ClassFinder
class ClassFinder
Class finder.
Constants
PHP_FILENAME_PATTERN |
PHP filename pattern. |
Properties
protected Finder | $finder | Finder instance. | |
protected bool | $includeClasses | Should classes be included? | |
protected bool | $includeAbstractClasses | Should abstract classes be included? | |
protected bool | $includeInterfaces | Should interfaces be included? | |
protected bool | $includeTraits | Should traits be included? |
Methods
Includes abstract classes.
Excludes abstract classes.
Includes abstract classes.
Excludes abstract classes.
Includes interfaces.
Excludes interfaces.
Includes traits.
Excludes traits.
Returns the tokens we're searching for.
Returns tokens that should be used to match namespace names.
Finds the class in a PHP file.
Returns all the classes.
Returns all the classes implementing the interface.
Returns all the classes extending the class.
Details
at line 73
__construct(Finder $finder)
Constructor.
at line 88
$this
includeClasses()
Includes abstract classes.
at line 100
$this
excludeClasses()
Excludes abstract classes.
at line 112
$this
includeAbstractClasses()
Includes abstract classes.
at line 124
$this
excludeAbstractClasses()
Excludes abstract classes.
at line 136
$this
includeInterfaces()
Includes interfaces.
at line 148
$this
excludeInterfaces()
Excludes interfaces.
at line 160
$this
includeTraits()
Includes traits.
at line 172
$this
excludeTraits()
Excludes traits.
at line 184
protected array
getAllowedClasslikeTokens()
Returns the tokens we're searching for.
at line 211
protected array
getNamespaceTokens()
Returns tokens that should be used to match namespace names.
at line 227
protected string|null
findClassInFile(string $path)
Finds the class in a PHP file.
at line 278
protected Generator
findClasses()
Returns all the classes.
at line 294
Generator
find()
Returns all the classes.
at line 305
Generator
findImplementing(string $interfaceName)
Returns all the classes implementing the interface.
at line 322
Generator
findExtending(string $className)
Returns all the classes extending the class.
at line 339
Generator
findUsing(string $traitName)
Returns all the classes using the trait.