Skip to content

Replace getClassesFromFile with a better API for getAllClasses #4

@asgrim

Description

@asgrim

From discussion on https://github.com/asgrim/better-reflection/pull/3/files#r33560669

getClassesFromFile without parameter? Seems a bit weird. The API is probably also redundant, now that you have the locator:

$allInString = (new Reflector(new FilenameSourceLocator('path/to/file.php'))->getAllClasses();
$allInFile = (new Reflector(new StringSourceLocator($code))->getAllClasses();
$allAutoloadable = (new Reflector(new ComposerSourceLocator($classLoader))->getAllClasses();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions