soundasleep/phpdoc2
Composer 安装命令:
composer require soundasleep/phpdoc2
包简介
Parse PHP documentation blocks and generate HTML output
README 文档
README
soundasleep/phpdoc2 is another PHP documentation generator, but tries to be cleaner
and smarter and more extensible than existing solutions.
For example, mark up your classes and methods with PHPDoc comment blocks:
namespace Openclerk\Currencies; /** * A "currency" represents some unit of measurement that can * be converted into another "currency" unit, e.g. through an {@link Exchange}. * Can also cover commodities. * * This is the base interface; other interfaces will provide additional * functionality as necessary. */ interface Currency { /** * Get the unique three-letter currency code for this currency, * e.g. 'btc' or 'usd'. Must be lowercase. This is not visible to users. */ public function getCode(); /** * @return true if this can be considered a "cryptocurrency", e.g. "btc" */ public function isCryptocurrency(); // ... }
Using
php -f phpdoc2.php -- --directory "src/" --output "docs/"
For easy documentation generation, you can use Grunt with the grunt-phpdoc2 task. For example, see the example Gruntfile provided in the phpdoc2-openclerk.
Templates
To override or extend these templates, add --templates "dir". The generator will add this directory of templates to override the default ones. Uses openclerk/pages, which means you can call subtemplates.
Demos
Top-level tags supported
@throws(Class) (description)@param$name (description)@returndescription@see(Class) (description)@deprecated(description)
Inline tags supported
{@link http://foo.com}{@link Class},{@link #method},{@link Class#method},{@link Class description},{@link Plural}s` etc{@code ...}
TODO
- Look at compatibility with phpdoc PSR standard and reference PSR examples
- Method and class summaries should only display the first sentance of the 'title' doc
- Highlight abstract classes
- Display inherited abstract methods on abstract classes
@authortag@sincetag@vartag@inheritDocinline tag - might be tricky- Class variables
- Class constants
- Global functions support
- Global constants
- Option for
issue #123to link to an external issue tracker - Link through to open source projects for composer projects
- Link through to source code for GitHub projects
See also
soundasleep/phpdoc2 适用场景与选型建议
soundasleep/phpdoc2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 84 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 04 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 soundasleep/phpdoc2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 soundasleep/phpdoc2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 84
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-04-20