Search code examples
phpdocphpdocumentor2

phpdocumentator2, phpdoc, won't parse inline links


I'm have issues trying to get inline tags to methods working, with phpDocumentor version 2.0.0a12. Using the sample code below, no matter what I try (eg /global/foo::bar(), foo::bar, foo::bar() etc) in the {@link parameter} the text gets printed out everytime, instead of parsed as an html anchor tag.

Is anybody else seeing this?

<?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;
    }

}

Maybe I'm missing a config parameter? The config using for above is:

<?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>

This could be considered a duplicate of PHPDoc inline {@link} (and Netbeans) but I dont' think so because I'm calling phpdoc from command line (not using and IDE). Any help seriously appreciated ;)


Solution

  • Inline {@link} is not yet implemented in v2 -- http://phpdoc.org/docs/latest/references/phpdoc/tags/link.html