Skip to content

crodas/function-discovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Function Discovery

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);

About

Efficient way of discovery functions from the Filesystem using annotations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published