-
-
Save manuelpichler/266811 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// set up include path | |
set_include_path(realpath(__DIR__ . '/../pflow/lib/') . PATH_SEPARATOR . get_include_path() . PATH_SEPARATOR); | |
require_once 'staticReflection/Autoloader.php'; | |
spl_autoload_register(array(new org\pdepend\reflection\Autoloader, 'autoload')); | |
require_once 'ReflectionFileSetQuery.php'; | |
use org\pdepend\reflection\ReflectionSession; | |
use org\pdepend\reflection\ReflectionClassProxyContext; | |
use org\pdepend\reflection\factories\NullReflectionClassFactory; | |
use org\pdepend\reflection\queries\ReflectionFileSetQuery; | |
$session = new ReflectionSession(); | |
$session->addClassFactory( new NullReflectionClassFactory() ); | |
// Should be moved into the "createFileSetQuery()" method | |
// $fileSetQuery = $session->createFileSetQuery(); | |
$fileSetQuery = new ReflectionFileSetQuery( | |
new ReflectionClassProxyContext( $session ) | |
); | |
$classes = $fileSetQuery->find(array('src/A.php', 'src/I.php')); | |
var_dump($classes[0]->getConstructor()); // Access constructor of A | |
var_dump($classes[0]->getInterfaces()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment