如何使用自定义注释在PHP中记录代码
在我的PHP代码中,我有很多地方,需要为不同客户自定义编程逻辑的默认行为。出于文档目的,我想宣传每个自定义逻辑。如果工具可以从这些注释中创建诸如phpdocumentator之类的文档,则完美是完美的。学说注释库似乎不合适,因为我不想自动实例化和解析类。
请参阅注释的示例:
/**
* @Mytool(
* customer=Customer1,
* title=set sepa confirmed when calling sepa finalize to immediately confirm payments without bank import
* ticket=#2916
* )
*/
if ($this->context->isCustomer1()) {
$mapper->setConfirmed($paymentIds);
}
有人可以建议搜索工具或关键字吗?
In my php code I have a lot of places, where I need to customize the default behaviour of the programming logic for different customers. For documentation purposes I want to annonate every custom logic. Perfect would be, if a tool can create a documentation like phpdocumentator from those annotations. The doctrine annotation library does not seem to fit, because I do not want to instantiate and parse classes automatically.
See this example of an annotation:
/**
* @Mytool(
* customer=Customer1,
* title=set sepa confirmed when calling sepa finalize to immediately confirm payments without bank import
* ticket=#2916
* )
*/
if ($this->context->isCustomer1()) {
$mapper->setConfirmed($paymentIds);
}
Can someone suggest a tool or keyword to search for?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论