35 lines
918 B
PHP
Executable File
35 lines
918 B
PHP
Executable File
#!/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();
|
|
});
|
|
$msg->asuccess();
|
|
});
|
|
$msg->asuccess();
|
|
});
|
|
msg::action("first2", function (IMessenger $msg) {
|
|
msg::action("second2", function (IMessenger $msg) {
|
|
msg::action("third2", function (IMessenger $msg) {
|
|
$msg->info("hello world2");
|
|
$msg->asuccess();
|
|
});
|
|
$msg->asuccess();
|
|
});
|
|
$msg->asuccess();
|
|
});
|
|
}
|
|
});
|