PHP code example of icanhazstring / symfony-console-spinner
1. Go to this page and download the library: Download icanhazstring/symfony-console-spinner 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/ */
icanhazstring / symfony-console-spinner example snippets
public function execute(OutputInterface $output, InputInterface $input)
{
$spinner = new SpinnerProgress($output, 100);
for($i = 0; $i < 100; $i++) {
usleep(1000);
$spinner->advance();
}
$spinner->finish();
}
$spinner = new SpinnerProgress($output, 100);
$spinner->getProgressBar()->setFormat('%bar% (%elapsed:6s%) %message%');