crodas / class-info
Get classes and functions defined in a given file
Installs: 23 105
Dependents: 6
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 2
Requires
- nikic/php-parser: ^4.0 | ^3.0 | ^2.0 | ^1.0
Requires (Dev)
- crodas/phpunit-compat: ^1.7
README
Get classes and functions defined in a given file. It implements a tiny PHP parser which gives you detailed informations about classes and functions defined in a file.
How to use it
<?php require __DIR__ . "/vendor/autoload.php"; $parser = new crodas\ClassInfo\ClassInfo; $parser->parse('demo.php'); foreach ($parser->getClasses() as $class) { foreach ($class->getMethods() as $method) { } foreach ($class->getProperties() as $prop) { } foreach ($class->getInterfaces() as $class) { } }