crodas / function-discovery
Discover and remember functions in the filesystem using annotations
Installs: 678
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/crodas/function-discovery
Requires
- crodas/notoj: >= 1.2
- crodas/remember: >=0.3.3
README
Discover PHP functions/methods in any directory using annotations. It walks throught the file system looking for annotations and builds a map to reuse later.
How to use
require __DIR__ . '/vendor/autoload.php'; /** @API my_name */ function foobar(Array $args) { return $args[0]; } $apis = new FunctionDiscovery(__DIR__); $functions = $apis->getFunctions('@api'); echo $functions['my_name']($arg1, $arg2);