定制 gamu1012/cli-text-decoration 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gamu1012/cli-text-decoration

最新稳定版本:1.0.0

Composer 安装命令:

composer require gamu1012/cli-text-decoration

包简介

String decoration library for PHP CLI output

README 文档

README

String decoration library for PHP CLI output

CliTextDecoration

Installation

composer require gamu1012/cli-text-decoration

Basic Usage

<?php

require __DIR__ . '/vendor/autoload.php';

echo \Gamu1012\CliTextDecoration::setString("RED")->red()->decorate() . "\n";
echo \Gamu1012\CliTextDecoration::setString("MAGENTA-WHITE_BACKGROUND-UNDERLINE")->magenta()->whiteBackground()->underLine()->decorate() . "\n";

To decorate a character string, first set the target string with setString

The setString method returns a CliTextDecoration instance

Use this to connect chain of decoration information.

Finally, we use the decorate method to get the result

Method List

Front Color

  • black()
  • red()
  • green()
  • yellow()
  • magenta()
  • cyan()
  • white()

Background Color

  • blackBackground()
  • redBackground()
  • greenBackground()
  • yellowBackground()
  • magentaBackground()
  • cyanBackground()
  • whiteBackground()

Attribute

  • bold()
  • italic()
  • underLine()
  • blink()
  • hidden()

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-17