PHP code example of ppokatilo / project-scanner

1. Go to this page and download the library: Download ppokatilo/project-scanner library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ppokatilo / project-scanner example snippets


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

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

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