Discover and remember functions in the filesystem using annotations

v0.7.1 2016-11-11 20:20 UTC

This package is auto-updated.

Last update: 2022-07-12 14:09:46 UTC


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