phix/commandlinelib

CommandLineLib通过流畅的接口提供高质量的命令行解析器

4.2.0 2014-08-02 13:03 UTC

This package is not auto-updated.

Last update: 2024-09-23 14:49:28 UTC


README

CommandLineLib3是一个简单易用的PHP组件,通过流畅的接口提供高质量的命令行解析器。

系统级安装

应该使用PEAR安装程序来安装CommandLineLib3。此安装程序是PHP社区安装PHP组件的事实标准。

sudo pear channel-discover pear.phix-project.org
sudo pear install --alldeps phix/CommandLineLib3

作为组件的依赖项

如果您正在创建依赖于CommandLineLib3的组件,请确保将CommandLineLib添加到您的组件package.xml文件中

<dependencies>
  <required>
    <package>
      <name>CommandLineLib3</name>
      <channel>pear.phix-project.org</channel>
      <min>3.0.0</min>
      <max>3.999.9999</max>
    </package>
  </required>
</dependencies>

用法

CommandLineLib3的最佳文档是其单元测试,这些测试包含在包中。您将在您的PEAR仓库中找到它们,在Linux系统中通常是/usr/share/php/test。

开发环境

如果您想修复或增强此组件,您将需要创建一个合适的发展环境。最简单的方法是安装phix4componentdev

# phix4componentdev
sudo apt-get install php5-xdebug
sudo apt-get install php5-imagick
sudo pear channel-discover pear.phix-project.org
sudo pear -D auto_discover=1 install -Ba phix/phix4componentdev

然后,您可以克隆git仓库

# CommandLineLib3
git clone git://github.com/stuartherbert/CommandLineLib.git

然后,安装此组件依赖项的本地副本以完成开发环境

# build vendor/ folder
phing build-vendor

为了使您的生活更加轻松,一些常见的任务(如运行单元测试、生成代码审查分析以及创建PEAR包)已通过phing自动化。您将在组件附带的build.xml文件中找到自动化步骤。

在组件的顶级文件夹中运行命令'phing'以查看可用的自动化任务列表。

许可证

有关完整的许可证详细信息,请参阅LICENSE.txt。