Download the PHP package volnix/jobber without Composer
On this page you can find all versions of the php package volnix/jobber. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download volnix/jobber
More information about volnix/jobber
Files in volnix/jobber
Package jobber
Short Description A slim library for printing typical CLI job output.
License MIT
Homepage https://github.com/volnix/jobber
Informations about the package jobber
Jobber
Jobber is a super-slim library for printing output from a CLI job. It supports command-line colors through the use of kevinlebrun/colors.php, a well-revered CLI color library.
It was built with simplicity in mind, as printing job output should be the least of your worries when building CLI-based scripts.
Example output from Jobber
Installation
Command line:
composer.json:
Usage
Typically the printer (Volnix/Jobber/Printer
) will be started, then stopped. The start method prints out the job name and and some asterisks to fence off this job's output. The stop method prints memory usage, runtime, and more fences.
Jobber also supports getting the output out of the printer in plain-text. This is especially useful for logging job output somewhere.
All message types:
- Info (
Printer::info()
) - Warning (
Printer::warning()
) - Success (
Printer::success()
) - Error (
Printer::error()
) - Fatal (
Printer::fatal()
)- Note:
fatal
is merely an alias forerror
andstop
in one call
- Note:
If you desire to toggle verbosity on your job, this is supported. This will only disable info messages, while still allowing others to come through.
Note: info messages will still be returned when calling Printer::getOutput() for logging purposes
If you desire to run multiple job "sessions" in one command, you can reset the printer.
Finally, you may use sprintf-style messages as well by passing a tokenized (%s, %d, etc.) string as your first argument and an array of tokens as your second.