aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Master.php
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-02-28 21:06:16 +0100
committerHilmar R <u02@u29lx193>2021-03-01 18:48:11 +0100
commitc26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch)
tree3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /Zotlabs/Daemon/Master.php
parentea3390d626f85b7293a750958bfd1b5460958365 (diff)
downloadvolse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip
get dev
Diffstat (limited to 'Zotlabs/Daemon/Master.php')
-rw-r--r--Zotlabs/Daemon/Master.php37
1 files changed, 18 insertions, 19 deletions
diff --git a/Zotlabs/Daemon/Master.php b/Zotlabs/Daemon/Master.php
index 8c3a7e570..6fa656be5 100644
--- a/Zotlabs/Daemon/Master.php
+++ b/Zotlabs/Daemon/Master.php
@@ -2,58 +2,57 @@
namespace Zotlabs\Daemon;
-if(array_search( __file__ , get_included_files()) === 0) {
+if (array_search(__file__, get_included_files()) === 0) {
require_once('include/cli_startup.php');
array_shift($argv);
$argc = count($argv);
- if($argc)
- Master::Release($argc,$argv);
+ if ($argc)
+ Master::Release($argc, $argv);
return;
}
-
class Master {
static public function Summon($arr) {
$hookinfo = [
- 'argv'=>$arr
+ 'argv' => $arr
];
- call_hooks ('daemon_master_summon',$hookinfo);
+ call_hooks('daemon_master_summon', $hookinfo);
- $arr = $hookinfo['argv'];
+ $arr = $hookinfo['argv'];
$argc = count($arr);
- if ((!is_array($arr) || (count($arr) < 1))) {
- logger("Summon handled by hook.",LOGGER_DEBUG);
+ if ((!is_array($arr) || ($argc < 1))) {
+ logger("Summon handled by hook.", LOGGER_DEBUG);
return;
}
- $phpbin = get_config('system','phpbin','php');
- proc_run($phpbin,'Zotlabs/Daemon/Master.php',$arr);
+ $phpbin = get_config('system', 'phpbin', 'php');
+ proc_run($phpbin, 'Zotlabs/Daemon/Master.php', $arr);
}
- static public function Release($argc,$argv) {
+ static public function Release($argc, $argv) {
cli_startup();
$hookinfo = [
- 'argv'=>$argv
+ 'argv' => $argv
];
- call_hooks ('daemon_master_release',$hookinfo);
+ call_hooks('daemon_master_release', $hookinfo);
$argv = $hookinfo['argv'];
$argc = count($argv);
- if ((!is_array($argv) || (count($argv) < 1))) {
- logger("Release handled by hook.",LOGGER_DEBUG);
+ if ((!is_array($argv) || ($argc < 1))) {
+ logger("Release handled by hook.", LOGGER_DEBUG);
return;
}
- logger('Master: release: ' . json_encode($argv), LOGGER_ALL,LOG_DEBUG);
- $cls = '\\Zotlabs\\Daemon\\' . $argv[0];
- $cls::run($argc,$argv);
+ logger('Master: release: ' . json_encode($argv), LOGGER_ALL, LOG_DEBUG);
+ $cls = '\\Zotlabs\\Daemon\\' . $argv[0];
+ $cls::run($argc, $argv);
}
}