Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/bot/PhabricatorBot.php
Show All 10 Lines | |||||
final class PhabricatorBot extends PhabricatorDaemon { | final class PhabricatorBot extends PhabricatorDaemon { | ||||
private $handlers; | private $handlers; | ||||
private $conduit; | private $conduit; | ||||
private $config; | private $config; | ||||
private $pollFrequency; | private $pollFrequency; | ||||
public function run() { | protected function run() { | ||||
$argv = $this->getArgv(); | $argv = $this->getArgv(); | ||||
if (count($argv) !== 1) { | if (count($argv) !== 1) { | ||||
throw new Exception('usage: PhabricatorBot <json_config_file>'); | throw new Exception('usage: PhabricatorBot <json_config_file>'); | ||||
} | } | ||||
$json_raw = Filesystem::readFile($argv[0]); | $json_raw = Filesystem::readFile($argv[0]); | ||||
$config = json_decode($json_raw, true); | $config = json_decode($json_raw, true); | ||||
if (!is_array($config)) { | if (!is_array($config)) { | ||||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |