bitandblack / cli-notification
Notification sounds and popups from the CLI
Requires
- php: >=7.2
- jolicode/jolinotif: ^2.1
- myclabs/php-enum: ^1.7
Requires (Dev)
- phpstan/phpstan: ^0.12
This package is auto-updated.
Last update: 2022-05-05 10:37:06 UTC
README
CLI Notification
Notification sounds and popups from the CLI.
Installation
This library is made for the use with Composer. Add it to your project by running $ composer require bitandblack/cli-notification
.
Usage
Sound
Whenever you want to play a sound, call the Sound::play()
method. It needs one parameter—the sound you want to play. This one is an Enum.
The play()
method is static, so you don't need to initialize the class.
<?php
use BitAndBlack\CLINotification\Sound;
use BitAndBlack\CLINotification\Enum\SoundEnum;
Sound::play(
SoundEnum::JOB_DONE()
);
Popup
Whenever you want to show a popup, call the Popup::show()
method. It needs You can set the title, the message and an image there.
The show()
method is static, so you don't need to initialize the class.
<?php
use BitAndBlack\CLINotification\Popup;
Popup::show(
'Title',
'Message',
'/path/to/image.jpg'
);
Help
If you have any questions, feel free to contact us under hello@bitandblack.com
.
Further information about Bit&Black can be found under www.bitandblack.com.