koriym/php-ontology

dev-master 2021-12-17 10:41 UTC

This package is auto-updated.

Last update: 2024-04-17 16:03:59 UTC


README

Read the words used in arguments, methods, etc. from the source code.

Installation

composer install

Usage

See demo.

$phpOntology = (new PhpOntology())('Koriym\PhpOntology', __DIR__ . '/Fake');
foreach ($phpOntology as $class) {
    $classes = $class();
    foreach ($classes as $method) {
        assert($method instanceof DocMethod);
        printf("Method name: title:%s type:%s desc:%s\n", $method->name, $method->title, $method->description);
        foreach ($method->params as $param) {
            assert($param instanceof DocParam);
            printf("Param: name:%s type:%s desc:%s\n", $param->name, $param->type, $param->description);
        }
    }
}