2

最近我遇到了 PhpDocumentor。它看起来像一个很好的文档工具。我想使用 'responsive-twig' 作为 phpDocumentor 附带的模板。我试过了;

  • --template="responsive-twig" 在带有 phpdoc 的命令行中,它说“错误:遇到未知的命令行选项“--template”,请使用 phpdoc -h 寻求帮助”

  • 在 /usr/share/php/phpDocumentor/data/phpdoc.tpl.xml 中将 'template' 标签的 'name' 属性更改为 'responsive-twig',默认为 'clean'

  • 在 /usr/share/php/phpDocumentor/phpdoc.dist.xml 中将 'template' 标签的 'name' 属性更改为 'responsive-twig'

但是我无法更改默认模板。

我已经通过 PEAR 安装了 phpDocumentor。我有三个 phpDocumentor 目录。/var/www 中的一个和 /usr/share/php 中的另外两个('phpDocumentor' 和 'PhpDocumentor')。

/usr/share/php/phpDocumentor/data/templates 下有一个“responsive-twig”文件夹。

请帮忙!

4

1 回答 1

2

仅供参考,成功如下:

yum install graphviz
pear install Image_GraphViz
rm -rf /tmp/phpdoc-twig-cache
phpdoc -d ./joomla-cms/libraries -t ./joomla-doc --template=responsive-twig

使用最新的 phpDocumentor 版本 2.8.1
可能会有所帮助!

于 2015-01-05T15:56:10.373 回答