public __construct ( Symfony\Component\Console\Output\OutputInterface $output, array $frames, integer $interval = 500000 ) | ||
$output | Symfony\Component\Console\Output\OutputInterface | |
$frames | array | The frames to display. Like any animation, this works best if the frames are all the same size. |
$interval | integer | Minimum interval between frames in microseconds. |
public function __construct(OutputInterface $output, array $frames, $interval = 500000)
{
$this->output = $output;
$this->frames = $frames;
$this->interval = $interval;
}
/** * @param OutputInterface $output */ public function __construct(OutputInterface $output) { $filenames = [CLI_ROOT . '/resources/bot/bot1', CLI_ROOT . '/resources/bot/bot2', CLI_ROOT . '/resources/bot/bot3', CLI_ROOT . '/resources/bot/bot4']; // The frames are the contents of each file, with each line indented. $frames = array_map(function ($filename) { return preg_replace('/^/m', ' ', file_get_contents($filename)) . "\n <info>Platform.sh</info>"; }, $filenames); parent::__construct($output, $frames); }