Skip to content
PHP Cli
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
lib
.gitignore
CHANGELOG.md
LICENSE
README.md
composer.json

README.md

PHP CLI Library

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
You can’t perform that action at this time.