承接 hvolschenk/cliphf 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hvolschenk/cliphf

Composer 安装命令:

composer require hvolschenk/cliphf

包简介

PHP Cli Formatting library.

README 文档

README

Very simple PHP CLI formatter.

Installation

Cliphf can either be cloned from the repository on Github or it can be installed via composer. The preferred way is through composer as you will then be able to receive updates easily.

Composer

$ php composer.phar require hvolschenk/cliphf

Git

$ git clone https://github.com/righteous-trespasser/cliphf.git

Usage

Output

You can format output for the command line with the Output::format static method. It takes in only one argument and that is the string to be formatted. You can specify formats in an HTML-like syntax as in the following example:

use Hvolschenk\Cliphf;

Output::format('{italic}Checking config{/italic}...');
if ($something === true) {
  Output::format('{bold}{green}Done.{/green}{/bold}')
}

Input

Capuring input is just as simple. You can specify normal text inputs and password inputs through CliPh-F with formatted labels:

$name = Input::text('Please enter your name: ');
$password = Input::password('Secret password: ');

Input text can also be formatted and uses the output class to format text:

use Hvolschenk\Cliphf;

$name = Input::text('{bold}{underline}Dangerous input:{/underline}{/bold}');

Rules

There are 10 style rules for text and 8 colors built-in. The rules are:

  • blink
    • Creates blinking text
  • bold
    • Highlights the text by using a bold font
  • dim
    • Dims the text by making the color darker
  • hide
    • Creates hidden text (Same color as background, un-highlight-able)
  • invert
    • Inverts the backgroud and foreground colors
  • italic
    • Emphasises text by making it italic
  • strikethrough
    • Draws a line through the text
  • underline
    • Draws attention to the text by underlining it
  • remove
    • removes all formatting
  • break
    • Adds a linebreak

The 8 colors are:

  • black
  • blue
  • cyan
  • green
  • magenta
  • red
  • white
  • yellow

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固