kilahm/clio 问题修复 & 功能扩展

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

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

kilahm/clio

最新稳定版本:0.2.2

Composer 安装命令:

composer require kilahm/clio

包简介

Command Line Input/Output for Hack.

README 文档

README

This package is a re-imagining of the wonderful League package Climate, except written in strict Hack.

WHY?!

I would really like to have useful tools for Hack. The primary advantage I see that Hack has over PHP is the static type checker. For the type checker to be useful, there needs to be statically typed libraries.

Usage

The API is unstable

For now I will list example code. This is one way in which I design my public facing APIs.

Construction

// Default input and output; same as not passing any input/output handlers to clio constructor
$input = new HackPack\Clio\StreamReader(STDIN);
$output = new HackPack\Clio\StreamWriter(STDOUT);
$clio = new HackPack\Clio\Clio($input, $output);

Parameters/Options

hhvm task.php "Some Call Me Tim" --with-title -t "Tim The Wizard"
// task.php
$clio = new HackPack\Clio\Clio();
$name = $clio->param('name')
             ->described('Description of the "name" argument.')
             ->required();
$titleFlag = $clio->flag('with-title')
$title = $clio->option('title')->aka('t')

Contributing

I would love to have feedback. Pull requests and issues are welcome!

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Hack

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固