webtrendi/clapp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webtrendi/clapp

Composer 安装命令:

composer require webtrendi/clapp

包简介

Parses command line arguments passed to a PHP script

README 文档

README

Build Status

Parses command line arguments passed to a PHP script.

Usage

// Define accepted arguments
$definitions = new \Clapp\CommandLineArgumentDefinition(array(
    "help|h"      => "Shows help message",
    "message|m=s" => "Input message",
    "verbose|v+"  => "Set level of verbose output",
));

// Filter arguments based and validate according to definitions
$filter = new \Clapp\CommandArgumentFilter($definitions, $argv);

// Retrieve parameter if set
if ($filter->getParam('h') !== false) {
    echo $definitions->getUsage();
    exit();
} //if

Features

  • Simple definition syntax
  • Supports long and short arugment names (-v --verbose)
  • Supports repeated arguments (--name=bob --name=mary)
  • Supports multiple short arguments (-abc equivalent of -a -b -c)
  • Supports 2 ways of setting values (--name=bob or --name bob)
  • Supports double dash delimiter for trailing values
  • Creates detailed usage documentation using definitions

统计信息

  • 总下载量: 277
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固