2017 © Pedro Peláez
 

library cli-text-decoration

String decoration library for PHP CLI output

image

gamu1012/cli-text-decoration

String decoration library for PHP CLI output

  • Saturday, June 17, 2017
  • by gamu1012
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

CliTextDecoration

String decoration library for PHP CLI output, (*1)

CliTextDecoration, (*2)

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, (*3)

The setString method returns a CliTextDecoration instance, (*4)

Use this to connect chain of decoration information., (*5)

Finally, we use the decorate method to get the result, (*6)

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()

The Versions

17/06 2017

dev-master

9999999-dev https://github.com/gamu1012/cli-text-decoration

String decoration library for PHP CLI output

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar gamu1012

17/06 2017

1.0.0

1.0.0.0 https://github.com/gamu1012/cli-text-decoration

String decoration library for PHP CLI output

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar gamu1012