【发布时间】:2016-04-27 12:47:58
【问题描述】:
我需要为 PhpDocumentor 创建自定义模板。问题是template.xml 中定义的路径,即使指定为绝对路径,也无法正确解析。 PhpDocumentor 在供应商目录中查找它们。
<template>
<author>Code Mine</author>
<email>office@code-mine.com</email>
<description>Template for Confluence API</description>
<version>1.0.0</version>
<transformations>
<transformation writer="twig" source="./index.html.twig" artifact="index.html"/>
<transformation query="indexes.namespaces" writer="twig" source="./namespace.html.twig" />
<transformation query="indexes.classes" writer="twig" source="./class.html.twig" />
</transformations>
</template>
尽管 twig 模板位于 xml 引用的路径中,但我收到文件不存在的错误。
编辑:
我还尝试在phpdoc.xml 中设置所有配置详细信息,希望路径将被视为相对于配置文件,但没有运气。
【问题讨论】:
-
首先,您的问题是什么?其次,贴一些代码。
-
@Fin 我的问题是如何强制 documentor 从特定位置获取模板,而不是从供应商目录中获取模板,所涉及的所有代码都是带有配置的 xml。
标签: php twig phpdoc phpdocumentor2