ppokatilo/project-scanner

Scan directories (for example vendor/, src/) for stuff

v1.0.1 2015-03-16 16:43 UTC

This package is not auto-updated.

Last update: 2024-11-05 02:23:12 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Scan directories (for example vendor/, src/) for stuff.

How to use

Use ProjectScanner to find classes in directories.

public function doStuff()
{
  $projectScanner = new ProjectScanner();

  foreach ($projectScanner->findInDirectory('Entity') as $scanResult) {
    echo $scanResult->getReference() . PHP_EOL;
    echo $scanResult->getFileInfo()->getRelativePath() . PHP_EOL;
  }
}

Output:

You\YourLibrary\Entity\Foo
src/You/YourLibrary/Entity/Foo.php
Me\MyLibrary\Entity\Foo\Bar
vendor/me/my-library/src/Entity/Foo/Bar.php