public function execute(InputInterface $input, OutputInterface $output) { $backend = $input->getArgument('backend'); try { $this->backendManager->enableBackend($backend); $output->writeln("Chat Backend '" . $backend . "' is enabled."); } catch (BackendNotFoundException $e) { $output->writeln("<error>Chat Backend does not exists.</error>"); } }
/** * @param string $protocol * @return \OCA\Chat\IBackend */ private function getBackend($protocol) { $this->backendManager->getBackendByProtocol($protocol); }