【phpDocumentor an application that is capable of analyzing your PHP source code and DocBlock comments to generate a complete set of API Documentation.】
phpDocumentor 2是一个可以 分析php源代码和注释块并生成文档的程序
Inspired by phpDocumentor 1 and JavaDoc it continues to innovate and is up to date with the latest technologies and PHP language features.
基于phpdocumentor1和javadoc启发而来,它持续创新的使用了一些新技术和支持php的新特性。
phpdocumentor2的特点:
- 兼容php5.3,全面支持命名空间和闭包等。【PHP 5.3 compatible, full support for Namespaces, Closures and more is provided.】
- 识别支持任何tag,以及一些追加的 (比如 @link). 【tagShows any tag, some tags add additional functionality to phpDocumentor (such as @link).】
- 更快的处理速度。 较 phpDocumentor 1在Zend Framework 下的处理耗时有了明显的减少【Processing speed, Zend Framework experienced a significant reduction in processing time compared to phpDocumentor 1.】
- 低内存消耗,小中大型工程的内存消耗分别低于20MB,40MB和100MB【Low memory usage, peak memory usage for small projects is less than 20MB, medium projects 40MB and large frameworks 100MB.】
- 增量解析。如果你有之前运行phpdoc获得的structure.xml文件,那么小修改后重新生成文档的速度将提升80%。【Incremental parsing, if you kept the Structure file from a previous run you get an additional performance boost of up to 80% on top of the mentioned processing speed above.】
- 简单就能创建模板,只需1小步和编辑3个文件。【Easy template building, if you want to make a branding you only have to call 1 task and edit 3 files.】
- 兼容1代的命令行。例如 --directory, --file and --target 【Command-line compatibility with phpDocumentor 1, phpDocumentor 2 is an application in its own right but the basic phpDocumentor 1 arguments, such as --directory, --file and --target, have been adopted.】
- 两步式处理。首先生成structure文件,你可以根据这个文件来格式化相关信息,用自己的工具来展现信息!【Two-step process, phpDocumentor first generates a cache with your application structure before creating the output. If you'd like you can use that to power your own tools or formatters!】
- PHP 5.3.3 or higher
- ext/iconv, http://php.net/manual/en/book.iconv.php (is enabled by default since PHP 5.0.0)
- ext/intl, http://php.net/manual/en/book.intl.php
- The XSL extension, http://www.php.net/manual/en/book.xsl.php (可选,只在使用xsl的模板时使用optional, only used with XSL based templates)
- Graphviz (可选,用来生成类图optional, used for generating Class diagrams)
Note: If you do not want to install the Graphviz dependency you are encouraged to generate your own template and make sure that it does not contain anything related to Graph
. An easier solution might be to editdata/templates/responsive/template.xml
file and remove every line containing the word Graph
but this will be undone with every upgrade of phpDocumentor.
Please see the documentation about creating your own templates for more information.
提醒:如果你不想安装Graphviz相关依赖项,建议你自己制作无关graph的模板。简单的方法是编辑data/templates/responsive/template.xml 文件并且移除所有包含graph这个词的行。但是每当phpDocumentor升级,将会被还原。建议你查看文档来制作你自己的模板。(yukon12345:其实不安装graphviz也可以,就是不能生成类图)
===============================================
翻译结束