PhpDocumentor安装使用记录_嗼淰_新浪博客

本文介绍了如何在Windows和Linux环境下安装和配置PHP开发工具,包括PEAR包管理器、Graphviz图形渲染工具及phpDocumentor文档生成器等。还提供了详细的命令行操作步骤,并对安装过程中的注意事项进行了说明。
摘要由CSDN通过智能技术生成

一、准备

说明:windows 执行一下命令需要已管理员身份运行cmd​,linux 则需要注意相应的权限。

​下载 pear  http://pear.php.net/go-pear.phar

将 go-pear.phar 放到 PHP 目录下

执行安装命令:

php go-pear.phar

​(如果已安装pear可以略过)

二、安装其他包

​pear install http://download.pear.php.net/package/Image_GraphViz-1.3.0.tgz

pear install XML_Parser

​pear install XML_Beautifier

查看已安装

pear list​​

下载和安装graphviz

linux 安装方式:

yum install 'graphviz*'

windows安装方式

http://www.graphviz.org/Download_windows.php 点击下载即可


​​但是要把graphviz安装成功,还是需要一点注意:​​

安装时候将路径设为无空格的,比如d:/graphviz就可以,然后手动把bin目录加入系统环

境变量path中

在cmd窗口下输入dot后如果不报错说明graphviz才算真的安装完全。

三、下载 http://www.phpdoc.org/phpDocumentor.phar​

​将phpDocumentor.phar 放到 PHP 目录下

执行

php phpDocumentor.phar -d /test/api -t docs/api​

则可将test/api 目录的程序转成相应的文档​​

phpDocumentor文档说明:

http://www.phpdoc.org/docs/latest/getting-started/installing.html

四、附上一些参数说明​

--target (-t)         Path where to store the generated output

 --cache-folder        Path where to store the cache files

 --filename (-f)       Comma-separated list of files to parse. The wildcards ? and * are supported (multiple values allowed)

 --directory (-d)      Comma-separated list of directories to (recursively) parse (multiple values allowed)

 --encoding            encoding to be used to interpret source files with

 --extensions (-e)     Comma-separated list of extensions to parse, defaults to php, php3 and phtml (multiple values allowed)

 --ignore (-i)         Comma-separated list of file(s) and directories (relative to the source-code directory) that will be ignored. Wildcards * and ? are supported (multiple values allowed)

 --ignore-tags         Comma-separated list of tags that will be ignored, defaults to none. package, subpackage and ignore may not be ignored. (multiple values allowed)

 --hidden              Use this option to tell phpDocumentor to parse files and directories that begin with a period (.), by default these are ignored

 --ignore-symlinks     Ignore symlinks to other files or directories, default is on

 --markers (-m)        Comma-separated list of markers/tags to filter (multiple values allowed)

 --title               Sets the title for this project; default is the phpDocumentor logo

 --force               Forces a full build of the documentation, does not increment existing documentation

 --validate            Validates every processed file using PHP Lint, costs a lot of performance

 --visibility          Specifies the parse visibility that should be displayed in the documentation (comma separated e.g. "public,protected") (multiple values allowed)

 --defaultpackagename  Name to use for the default package. (default: "Default")

 --sourcecode          Whether to include syntax highlighted source code

 --progressbar (-p)    Whether to show a progress bar; will automatically quiet logging to stdout

 --template            Name of the template to use (optional) (multiple values allowed)

 --parseprivate        Whether to parse DocBlocks marked with @internal tag

 --log                 Log file to write to

 --help (-h)           Display this help message

 --quiet (-q)          Do not output any message

 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

 --version (-V)        Display this application version

 --ansi                Force ANSI output

 --no-ansi             Disable ANSI output

 --no-interaction (-n) Do not ask any interactive question

 --config (-c)         Location of a custom configuration file


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嗼唸

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值