Download the PHP package phalapi/cli without Composer

On this page you can find all versions of the php package phalapi/cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cli

CLI扩展类库

此类库可用于开发命令行应用,基于GetOpt.PHP,主要作用是将命令参数进行解析和处理。

安装

执行 ,或 在项目的composer.json文件中,添加:

配置好后,再执行更新操作即可。

编写你的命令行入口文件

创建以下的CLI入口文件,保存到:bash $ ./bin/phalapi-cli Usage: ./bin/phalapi-cli [options] [operands]

Options: -s, --service 接口服务 -h, --help 查看帮助信息

Service:
缺少service参数,请使用 -s 或 --service 指定需要调用的API接口。

$ ./bin/phalapi-cli -s App.Hello.World

Service: App.Hello.World { "ret": 200, "data": { "content": "Hello World!" }, "msg": "" } -hbash $ ./bin/phalapi-cli -s App.Examples_Rule.SexEnum -h Usage: ./bin/phalapi-cli [options] [operands]

Options: -s, --service 接口服务 -h, --help 查看帮助信息 --sex [] 性别,female为女,male为男。 bash $ php ./bin/phalapi-cli --service App.User_User.Register Usage: ./bin/phalapi-cli [options] [operands]

Options: -s, --service 接口服务 -h, --help 查看帮助信息 --username 必须;账号,账号需要唯一 --password 必须;密码 --avatar [] 默认 ;头像链接 --sex [] 默认 0;性别,1男2女0未知 --email [] 默认 ;邮箱 --mobile [] 默认 ;手机号

Service: App.User_User.Register 缺少username参数,请使用 --username 指定:账号,账号需要唯一 PhalApi\CLI\Lite::getHelpText($text)./bin/phalapi-clibash $ php ./bin/phalapi-cli Usage: ./bin/phalapi-cli [options] [operands]

Options: -s, --service 接口服务 -h, --help 查看帮助信息

--- 自定义的帮助说明 ---

Service: 缺少service参数,请使用 -s 或 --service 指定需要调用的API接口 PhalApi\CLI\Lite::getServiceList() array( 编号 => array('service接口服务名称', '功能说明'), ) bash $ ./bin/phalapi-cli Usage: ./bin/phalapi-cli [options] [operands]

Options: -s, --service 接口服务 -h, --help 查看帮助信息

--- 自定义的帮助说明 ---

Service: 1) App.Hello.World 演示接口

缺少service参数,请使用 -s 或 --service 指定需要调用的API接口。 bash $ ./bin/phalapi-cli -s 1

Service: App.Hello.World { "ret": 200, "data": { "content": "Hello World!" }, "msg": "" }

// 完成命令行参数获取后的操作,方便追加公共参数
protected function afterGetOptions($options) {
    return $options;
}


## 参考和依赖  

phalapi/cli使用了[GetOpt.PHP](https://github.com/getopt-php/getopt-php)进行命令参数的获取的解析。  

关于更多关于php处理命令行参数,或者需要定制自己和升级命令行处理的参数格式,可以参考[GetOpt.php的官方文档-Example](http://getopt-php.github.io/getopt-php/example.html)。   

All versions of cli with dependencies

PHP Build Version
Package Version
Requires ulrichsg/getopt-php Version 3.4.0
php Version >=5.3.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phalapi/cli contains the following files

Loading the files please wait ....