Output

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

Installation

composer require mediashare/kernel
Bash

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);
PHP

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"); 
PHP

MarquandT

Ethical Hacker ~ Web Developper ~ Hosting Provider ~ Crypto Enthusiast ~ Automation Expert Bitcoin donation: 32Uu4NKGnxSPC7UukYXVyRHwbppbQpKVki

Comments

You must login to send a comment.