PHP Класс Platformsh\Cli\Util\ConsoleAnimation

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$currentFrame
$frames
$interval
$lastFrame
$lastFrameTime
$output

Открытые методы

Метод Описание
__construct ( Symfony\Component\Console\Output\OutputInterface $output, array $frames, integer $interval = 500000 )
render ( string $placeholder = '.' ) Display the current frame, and advance the pointer to the next one.

Описание методов

__construct() публичный Метод

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.

render() публичный Метод

If the output is capable of using ANSI escape codes, this will attempt to overwrite the previous frame. But if the output is not ANSI-compatible, this will display the $placeholder instead. So, to display an endless animation only where it's safe, use: $animation = new ConsoleAnimation($output, $frames); do { $animation->render(); } while ($output->isDecorated());
public render ( string $placeholder = '.' )
$placeholder string

Описание свойств

$currentFrame защищенное свойство

protected $currentFrame

$frames защищенное свойство

protected $frames

$interval защищенное свойство

protected $interval

$lastFrame защищенное свойство

protected $lastFrame

$lastFrameTime защищенное свойство

protected $lastFrameTime

$output защищенное свойство

protected $output