Ejemplo n.º 1
0
<?php

require __DIR__ . '/../src/classfinder.php';
$finder = new \TheSeer\Autoload\ClassFinder();
$rc = $finder->parseFile(__DIR__ . '/../src/classfinder.php');
var_dump($rc, $finder->getClasses());
Ejemplo n.º 2
0
<?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();
Ejemplo n.º 3
0
<?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);