modifs.mineures sans commentaires
This commit is contained in:
parent
64e18fdcc2
commit
4d883690cb
|
@ -11,9 +11,11 @@ interface IObjectWorkflow {
|
|||
|
||||
/**
|
||||
* synchroniser les données spécifiées vers l'objet correspndant, en le créant
|
||||
* si nécessaire
|
||||
* si nécessaire.
|
||||
*
|
||||
* $updated=true si l'objet a été créé ou mis à jour, false sinon
|
||||
*/
|
||||
function createOrUpdate(array $data, ?array $params=null): LdapObject;
|
||||
function createOrUpdate(array $data, ?array $params=null, ?bool &$updated=null): LdapObject;
|
||||
|
||||
/**
|
||||
* modifier uniquement le mot de passe de l'objet correspondant
|
||||
|
|
|
@ -56,6 +56,7 @@ class icon {
|
|||
static final function config(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("config", $suffix, $alt); }
|
||||
static final function save(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("save", $suffix, $alt); }
|
||||
static final function download(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("download", $suffix, $alt); }
|
||||
static final function bin(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("bin", $suffix, $alt); }
|
||||
static final function mail(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("mail", $suffix, $alt); }
|
||||
static final function search(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("search", $suffix, $alt); }
|
||||
static final function user(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("user", $suffix, $alt); }
|
||||
|
@ -89,6 +90,9 @@ class icon {
|
|||
static final function heart(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("heart", $suffix, $alt); }
|
||||
static final function heart_empty(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("heart_empty", $suffix, $alt); }
|
||||
|
||||
static final function plus(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("plus", $suffix, $alt); }
|
||||
static final function minus(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("minus", $suffix, $alt); }
|
||||
|
||||
# template:
|
||||
#static final function xxx(?string $suffix=null, ?string $alt=null): array { return self::manager()->getIcon("xxx", $suffix, $alt); }
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ class ProxyMessenger implements IMessenger {
|
|||
$msg->action($content, null, $level);
|
||||
if ($msg instanceof _IMessenger) {
|
||||
$useFunc = true;
|
||||
$untils[] = $msg->_getTitleMark();
|
||||
$untils[] = $msg->_getActionMark();
|
||||
}
|
||||
}
|
||||
if ($useFunc && $func !== null) {
|
||||
|
|
|
@ -584,6 +584,9 @@ class StdMessenger implements _IMessenger {
|
|||
elseif ($result === false) $this->afailure();
|
||||
else $this->adone($result);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$this->afailure($e);
|
||||
throw $e;
|
||||
} finally {
|
||||
$this->_endAction($until);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
#!/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);
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue