streams/Zotlabs/Daemon/Master.php
Klaus Weidenbach 745515b11f [FEATURE] Add config and use composer autoloader.
We use composer already to install SabreDAV. Include config
composer.(json|lock) to install and manage more dependencies
in future.
Also provide PSR-4 autoloading for our namespaced classes, e.g.
"Zotlabs\". To regenerate autoloader maps use:
$ composer install --optimize-autoloader --no-dev

We could also remove the whole vendor/ folder from our repository, but
that would need changes in deployment and how to install hubs and needs
more discussion first.
2016-10-18 18:11:41 +02:00

30 lines
565 B
PHP

<?php
namespace Zotlabs\Daemon;
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);
killme();
}
class Master {
static public function Summon($arr) {
proc_run('php','Zotlabs/Daemon/Master.php',$arr);
}
static public function Release($argc,$argv) {
cli_startup();
logger('Master: release: ' . print_r($argv,true), LOGGER_ALL,LOG_DEBUG);
$cls = '\\Zotlabs\\Daemon\\' . $argv[0];
$cls::run($argc,$argv);
}
}