/**
  * @param InputInterface $input
  * @param OutputInterface $output
  *
  * @return int|null|void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $redis = new Client(sprintf('tcp://%s:%d', ConfigurationLoader::get('client.async.redis.host'), ConfigurationLoader::get('client.async.redis.port')));
     $logger = LoggerFactory::create('Client #' . $input->getArgument('client_id'), true);
     $client = ClientFactory::create($logger, $redis, $input->getArgument('account_key'), $input->getArgument('client_id'), true);
     $connector = new ClientWorker($logger, $client, $redis);
     $connector->listen();
 }
Beispiel #2
0
 /**
  *
  */
 public function __construct()
 {
     $this->logger = LoggerFactory::create();
 }
Beispiel #3
0
 /**
  * @param ApiManager $apiManager
  */
 public function __construct(ApiManager $apiManager)
 {
     $this->apiManager = $apiManager;
     $this->logger = LoggerFactory::create();
     $this->formatters = ['native' => new NativeClientFormatter(), 'json' => new JsonClientFormatter(), 'xml' => new XmlClientFormatter()];
 }