【问题标题】:phpdocumentator2, phpdoc, won't parse inline linksphpdocumentator2,phpdoc,不会解析内联链接
【发布时间】:2013-07-24 11:41:10
【问题描述】:

我在尝试使用 phpDocumentor version 2.0.0a12 将内联标签添加到有效的方法时遇到问题。使用下面的示例代码,无论我在 {@link 参数} 中尝试什么(例如 /global/foo::bar()、foo::bar、foo::bar() 等),每次都会打印出文本,而不是解析为 html 锚标记。

还有人看到这个吗?

<?php
/**
 * File docblock thingy
 */

/**
 * Class docblock thingy
 */
class foo{

    /**
     * Description for bar {@link http://google.ie click for google} this is the inline link
     * @return boolean Default true
     */
    public function bar(){
        return true;
    }

    /**
     * Description for baz {@link foo::bar()}
     * @return boolean Default false
     */
    public function baz(){
        return false;
    }

}

也许我缺少配置参数?上面使用的配置是:

<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
  <parser>
    <target>.</target>
    <default-package-name>Foo</default-package-name>
    <parseprivate>on</parseprivate>
  </parser>

  <transformer>
    <target>docs</target>
  </transformer>
  <files>
    <directory>.</directory>
  </files>
</phpdoc>

这可能被认为是PHPDoc inline {@link} (and Netbeans) 的副本,但我不这么认为,因为我是从命令行调用 phpdoc(不使用和 IDE)。 任何帮助都非常感谢;)

【问题讨论】:

    标签: phpdoc phpdocumentor2


    【解决方案1】:

    内联 {@link} 尚未在 v2 中实现 -- http://phpdoc.org/docs/latest/references/phpdoc/tags/link.html

    【讨论】:

    • 不要惊慌 ;-) 它很快就会到来 :-)
    • @ashnazg 是吗?您的评论来自 2013 年......他们的文档仍然说它尚未实施......
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-12
    • 2013-02-28
    • 2022-11-17
    • 2016-09-21
    • 1970-01-01
    • 2011-03-24
    相关资源
    最近更新 更多