2024-05-03 08:07:18 +04:00
|
|
|
#!/usr/bin/php
|
|
|
|
<?php
|
|
|
|
require(__DIR__.'/../vendor/autoload.php');
|
|
|
|
|
|
|
|
use nur\cli\Application;
|
|
|
|
use nur\sery\output\IMessenger;
|
|
|
|
use nur\sery\output\msg;
|
|
|
|
use nur\sery\ValueException;
|
|
|
|
|
|
|
|
Application::run(new class extends Application {
|
|
|
|
function main() {
|
|
|
|
msg::title("major", function (IMessenger $msg) {
|
|
|
|
$msg->error("error", msg::MAJOR);
|
2024-05-16 09:42:00 +04:00
|
|
|
$msg->warning("warning", msg::MAJOR);
|
2024-05-03 08:07:18 +04:00
|
|
|
$msg->note("note", msg::MAJOR);
|
|
|
|
$msg->info("info", msg::MAJOR);
|
|
|
|
$msg->info(new ValueException("exception"), msg::MAJOR);
|
|
|
|
}, msg::MAJOR);
|
|
|
|
msg::title("normal", function (IMessenger $msg) {
|
|
|
|
$msg->error("error", msg::NORMAL);
|
2024-05-16 09:42:00 +04:00
|
|
|
$msg->warning("warning", msg::NORMAL);
|
2024-05-03 08:07:18 +04:00
|
|
|
$msg->note("note", msg::NORMAL);
|
|
|
|
$msg->info("info", msg::NORMAL);
|
|
|
|
$msg->info(new ValueException("exception"), msg::NORMAL);
|
|
|
|
}, msg::NORMAL);
|
|
|
|
msg::title("minor", function (IMessenger $msg) {
|
|
|
|
$msg->error("error", msg::MINOR);
|
2024-05-16 09:42:00 +04:00
|
|
|
$msg->warning("warning", msg::MINOR);
|
2024-05-03 08:07:18 +04:00
|
|
|
$msg->note("note", msg::MINOR);
|
|
|
|
$msg->info("info", msg::MINOR);
|
|
|
|
$msg->info(new ValueException("exception"), msg::MINOR);
|
|
|
|
}, msg::MINOR);
|
|
|
|
msg::title("debug", function (IMessenger $msg) {
|
|
|
|
$msg->error("error", msg::DEBUG);
|
2024-05-16 09:42:00 +04:00
|
|
|
$msg->warning("warning", msg::DEBUG);
|
2024-05-03 08:07:18 +04:00
|
|
|
$msg->note("note", msg::DEBUG);
|
|
|
|
$msg->info("info", msg::DEBUG);
|
|
|
|
$msg->info(new ValueException("exception"), msg::DEBUG);
|
|
|
|
}, msg::DEBUG);
|
|
|
|
}
|
|
|
|
});
|