koriym/php-ontology

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

This package is auto-updated.

Last update: 2024-09-17 16:50:53 UTC


README

从源代码中读取用于参数、方法等处的单词。

安装

composer install

用法

参见 演示

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