Notification sounds and popups from the CLI
- php: >=7.4
- jolicode/jolinotif: ^2.0
- myclabs/php-enum: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.5
- rector/rector: ^0
- symplify/easy-coding-standard: ^11.0
This package is auto-updated.
Last update: 2023-05-21 21:34:09 UTC
Notification sounds and popups from the CLI.
This library is made for the use with Composer. Add it to your project by running
$ composer require bitandblack/cli-notification.
Whenever you want to play a sound, call the
Sound::play() method. It needs one parameter — the sound you want to play. You can use the SoundFileEnum that holds some basic sounds or provide your own class holding custom sounds by implementing the SoundFileInterface.
play() method is static, so you don't need to initialize the class.
<?php use BitAndBlack\CLINotification\Sound; use BitAndBlack\CLINotification\SoundFile\SoundFileEnum; Sound::play( SoundFileEnum::JOB_DONE() );
Whenever you want to show a popup, call the
Popup::show() method. You can set the title, the message and an image there.
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' );
If you have any questions, feel free to contact us under
Further information about Bit&Black can be found under www.bitandblack.com.