Output

Output réunie plusieurs function permettant l'output de message via la console.

Installation

composer require mediashare/kernel
1

Usage

ProgressBar

<?php
// ./console.php
require 'vendor/autoload.php';
use Mediashare\Kernel\Kernel;

$kernel = new Kernel();
$kernel->run();

$output = $kernel->get('Output');
$output->progressBar(1, 3, 'Init');
sleep(3);
$output->progressBar(2, 3, 'Run');
sleep(3);
$output->progressBar(3, 3, 'Finish');
sleep(3);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

EchoColor

<?php
// ./console.php
require 'vendor/autoload.php';
use Mediashare\Kernel\Kernel;

$kernel = new Kernel();
$kernel->run();

$output = $kernel->get('Output');
// black, blue, green, cyan, red, purple, brown, yellow, white
$output->echoColor("Hello World!", "yellow"); 
1
2
3
4
5
6
7
8
9
10
11
Last Updated: 1/3/2020, 7:47:51 AM