【问题标题】:Exclude some directories in phpdox排除phpdox中的一些目录
【发布时间】:2015-01-22 08:13:02
【问题描述】:

我有 phpdox 来生成我的 API 文档并且它可以工作,但我希望它排除一些目录(如 Zend 和 smarty)。 在我的 phpdox.xml 中,收集器部分看起来像这样(它不起作用):

    <collector publiconly="false" backend="parser">
        <!--  @publiconly - Flag to disable/enable processing of non public methods and members -->
        <!--  @backend    - The collector back end to use, currently only shipping with 'parser' -->

        <!--  <include / exclude filter for filelist generator, mask must follow fnmatch() requirements  -->
        <include mask="*.php" />
        <exclude mask="Zend/*" />
        <exclude mask="smarty/*" />

        <!--  How to handle inheritance -->
        <inheritance resolve="true">
            <!--  @resolve - Flag to enable/disable resolving of inheritance -->

            <!--  You can define multiple (external) dependencies to be included -->
            <!--  <dependency  path="" -->
            <!--    @path  - path to a directory containing an index.xml for a dependency project -->
        </inheritance>

    </collector>

排除掩码有什么问题?

【问题讨论】:

    标签: php phpdoc phpdocx


    【解决方案1】:

    自己找到的:

        <collector publiconly="false" backend="parser">
            <!--  @publiconly - Flag to disable/enable processing of non public methods and members -->
            <!--  @backend    - The collector backend to use, currently only shipping with 'parser' -->
    
            <!--  <include / exclude filter for filelist generator, mask must follow fnmatch() requirements  -->
            <include mask="*.php" />
            <exclude mask="**Zend**"/>
            <exclude mask="**smarty**"/>
    
            <!--  How to handle inheritance -->
            <inheritance resolve="true">
                <!--  @resolve - Flag to enable/disable resolving of inheritance -->
    
                <!--  You can define multiple (external) dependencies to be included -->
                <!--  <dependency  path="" -->
                <!--    @path  - path to a directory containing an index.xml for a dependency project -->
            </inheritance>
    
        </collector>
    

    必须使用“**DIRNAME**”方法才能这样做,请参阅上面的代码。

    【讨论】:

    • 对我不起作用,因为树下包含“排除标签”的所有内容都被排除在外。
    猜你喜欢
    • 1970-01-01
    • 2011-08-01
    • 2013-12-14
    • 1970-01-01
    • 2015-09-26
    • 1970-01-01
    • 2011-09-06
    • 1970-01-01
    相关资源
    最近更新 更多