There is no license information available for the latest version (1.0.0) of this package.

PHP CLI

1.0.0 2015-02-22 16:35 UTC

This package is auto-updated.

Last update: 2024-12-06 02:42:51 UTC


README

by WNowicki

Scrutinizer Code Quality Build Status

Install

Composer Installation

To install cli library you will need to use Composer in your project. If you aren't using Composer yet, it's really simple!

curl -sS https://getcomposer.org/installer | php

Cli Installation

php composer.phar require wnowicki/cli:~1.0

Example

$box = \WNowicki\Cli\Box::makeFromString("Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit.", null, null, \WNowicki\Cli\Color::BG_RED);

$box2 = \WNowicki\Cli\Box::make(20, 7, \WNowicki\Cli\Color::COLOR_YELLOW, null, \WNowicki\Cli\Color::BG_WHITE)
    ->addBorder('*', null, \WNowicki\Cli\Color::BG_RED)
    ->addTitle('Box', \WNowicki\Cli\Color::COLOR_BLACK);

\WNowicki\Cli\Screen::make()
    ->putInCenter($box, 6)
    ->putInColumn($box2, 2, 1, 10)
    ->putInColumn($box2, 2, 2, 10)
    ->addTitle('Title', \WNowicki\Cli\Color::COLOR_GREEN, null, \WNowicki\Cli\Color::BG_BLACK)
    ->render();

Demo

Run:

cd demo
php snake.php