streams/Code/Daemon/Deliver_hooks.php
2022-11-27 20:15:28 +11:00

26 lines
414 B
PHP

<?php
namespace Code\Daemon;
use Code\Extend\Hook;
class Deliver_hooks implements DaemonInterface
{
public function run(int $argc, array $argv): void
{
if ($argc < 2) {
return;
}
$r = q(
"select * from item where id = '%d'",
intval($argv[1])
);
if ($r) {
Hook::call('notifier_normal', $r[0]);
}
}
}