1. Go to this page and download the library: Download eoko/zf-console library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
eoko / zf-console example snippets
$this->warn('this is not cool');
// [DONE] should output red text
$this->msg('[warn]not cool again[vvvv] with very verbose text[/vvvv][/warn]');
// [DONE] should output red text.
// [TODO] get verbosity from outside and if console is verbose, add the vvvv text
$this->msg('Hello {{username}} !', ['username' => 'merlin']);
// [DONE] should output "Hello merlin"
$this->msg('[notice]Hello {{username}} ![/notice]');
// [DONE] should output "Hello merlin" in blue
$this->message()->show('text');
$this->message()->notice('notice');
// eq to $this->message()->show('[msg fg="blue"]notice[/msg]');
$this->message()->success('success');
// eq to $this->message()->show('[msg fg="green"]success[/msg]');
$this->message()->comment('comment');
// eq to $this->message()->show('[msg fg="yellow"]comment[/msg]');
$this->message()->warn('warn');
// eq to $this->message()->show('[msg fg="magenta"]warn[/msg]');
$this->message()->danger('danger');
// eq to $this->message()->show('[msg fg="red"]danger[/msg]');
$this->message()->show('[msg fg="white" bg="red"]kkkkk[/msg]');