35 lines
982 B
PHP
35 lines
982 B
PHP
|
#!/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\UserException;
|
||
|
|
||
|
Application::run(new class extends Application {
|
||
|
function main() {
|
||
|
msg::section("ma section");
|
||
|
msg::action("first", function (IMessenger $msg) {
|
||
|
msg::action("second", function (IMessenger $msg) {
|
||
|
msg::action("third", function (IMessenger $msg) {
|
||
|
$msg->info("hello world");
|
||
|
$msg->asuccess(null, msg::DEBUG);
|
||
|
});
|
||
|
$msg->asuccess();
|
||
|
});
|
||
|
$msg->asuccess(null, msg::DEBUG);
|
||
|
});
|
||
|
msg::action("first2", function (IMessenger $msg) {
|
||
|
msg::action("second2", function (IMessenger $msg) {
|
||
|
msg::action("third2", function (IMessenger $msg) {
|
||
|
$msg->info("hello world2");
|
||
|
$msg->asuccess(null, msg::DEBUG);
|
||
|
});
|
||
|
$msg->asuccess();
|
||
|
});
|
||
|
$msg->asuccess(null, msg::DEBUG);
|
||
|
});
|
||
|
}
|
||
|
});
|