Skip to content

PHP-library for a beautiful output to the console. Color, progressbar, table

Notifications You must be signed in to change notification settings

deeseefromcd/CliWriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Example:


    $countries = array(
        'United States' => array('New York', 'Chicago', 'Atlanta', 'Dallas', 'Los Angeles', 'Denver', 'Houston', 'Las Vegas', 'Phoenix', 'Washington', 'Charlotte', 'San Francisco', 'Minneapolis', 'Seattle', 'Boston', 'Detroit', 'Orlando', 'Philadelphia', 'San Diego', 'Salt Lake City'),
        'Germany' => array('Munich', 'Dresden', 'Berlin', 'Bremen', 'Frankfurt', 'Hamburg', 'Dusseldorf', 'Dortmund', 'Stuttgart', 'Kassel', 'Westerland')
    );

    foreach ($countries as $countryName => $cities){
        CliWriter::startProgress();
        CliWriter::sendLine($countryName . ' %progress%');
        sleep(1);
        foreach ($cities as $num => $city){
            CliWriter::sendMessage($city);
            CliWriter::sendProgress($num+1, count($cities), CliWriter::PROGRESS_STYLE_OF_PERCENT);
            sleep(1);
        }
        CliWriter::endProgress();
    }

screenshot

About

PHP-library for a beautiful output to the console. Color, progressbar, table

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages