<?php require __DIR__ . '/../autoload.php'; require 'TheSeer/DirectoryScanner/autoload.php'; $scanner = new \TheSeer\DirectoryScanner\DirectoryScanner(); $scanner->addInclude('*.php'); $finder = new \TheSeer\Autoload\ClassFinder(); $found = $finder->parseMulti($scanner('../src')); $ab = new \TheSeer\Autoload\AutoloadBuilder($finder->getClasses()); $ab->setIndent("\t"); $ab->setLineBreak("\r\n"); echo $ab->render();
<?php require '../src/classfinder.php'; require '../src/dependencysorter.php'; $finder = new \TheSeer\Autoload\ClassFinder(true); $finder->parseFile('../tests/_data/dependency/file2.php'); $finder->parseFile('../tests/_data/dependency/file1.php'); $found = $finder->getClasses(); $x = new \TheSeer\Autoload\classDependencySorter($found, $finder->getDependencies()); $r = $x->process(); var_dump($found, $finder->getDependencies(), $r);
<?php require __DIR__ . '/../src/classfinder.php'; $finder = new \TheSeer\Autoload\ClassFinder(); $rc = $finder->parseFile(__DIR__ . '/../src/classfinder.php'); var_dump($rc, $finder->getClasses());
<?php require __DIR__ . '/../autoload.php'; require 'TheSeer/DirectoryScanner/autoload.php'; $scanner = new \TheSeer\DirectoryScanner\DirectoryScanner(); $scanner->addInclude('*.php'); $finder = new \TheSeer\Autoload\ClassFinder(); $rc = $finder->parseMulti($scanner('../src')); var_dump($rc, $finder->getClasses());