Gem 一覧へ戻る
alecrabbit/php-cli-snake(新しいタブで開きます)
主要言語: PHP
Lightweight cli spinner with zero dependencies
- star 数
- 29
- watcher 数
- 1
- fork 数
- 2
- issue 数
- 1
- 最終更新
- 2021/01/26
主要言語: PHP
Lightweight cli spinner with zero dependencies
"require": {
"php": "^7.3 || ^8.0"
}
$ composer require alecrabbit/php-cli-snake
require_once __DIR__ . '/../vendor/autoload.php'; use AlecRabbit\Snake\Spinner; use React\EventLoop\Factory; $s = new Spinner(); $loop = Factory::create(); $loop->addPeriodicTimer($s->interval(), static function () use ($s) { $s->spin(); }); $s->begin(); $loop->run(); $s->end();
See examples
| Feature | php-console-spinner | php-cli-snake |
|---|---|---|
| Lightweight | ❌ ️ | ✔️ |
| Has zero dependencies | ❌ ️ | ✔️ |
| Highly configurable | ✔️ ️ | ❌ |
| Contains various spinner classes | ✔️ ️ | ❌ |
| Progress indicator | ✔️ ️ | ❌ |
| Messages indicator | ✔️ ️ | ❌ |
| Color settings for spinner | ✔️ ️ | ❌ |
| Color settings for messages | ✔️ ️ | ❌ |
| Color settings for progress indicator | ✔️ ️ | ❌ |
Has disable() method |
✔️ ️ | ❌ |
Has enable() method |
✔️ ️ | ❌ |
| Can show final message | ✔️ ️ | ❌ |
| Cursor hide can be disabled | ✔️ ️ | ❌ |
| Can use optional custom output | ✔️ ️ | ❌ |
Has erase() method |
✔️ ️ | ✔️ ️ |
Hides cursor with $spinner->begin() |
✔️ ️ | ✔️ ️ |
Shows cursor with $spinner->end() |
✔️ ️ | ✔️ ️ |
| Supports piping | ✔️ ️ | ✔️ ️ |
| Supports redirect | ✔️ ️ | ✔️ ️ |
Supports no color mode |
✔️ ️ | ✔️ ️ |
Supports 16 color mode |
✔️ ️ | ✔️ ️ |
Supports 256 color mode |
✔️ ️ | ✔️ ️ |