aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-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);
}
}