/** * This command loads all the exchange rates from base_currency to all available * currencies * * @param InputInterface $input The input interface * @param OutputInterface $output The output interface * * @return void */ protected function execute(InputInterface $input, OutputInterface $output) { $this->startCommand($output); $plugins = $this->pluginRepository->findAll(); /** * @var Plugin $plugin */ foreach ($plugins as $plugin) { $this->printMessage($output, 'Plugin', $plugin->getNamespace() . ' - [Hash : ' . $plugin->getHash() . ']'); } $this->finishCommand($output); }
/** * Load existing plugins from database and return an array with them all, * indexed by its namespace. * * @return Plugin[] Plugins indexed by namespace */ private function getExistingPlugins() { $pluginsIndexed = []; $plugins = $this->pluginRepository->findAll(); /** * @var Plugin $plugin */ foreach ($plugins as $plugin) { $pluginNamespace = $plugin->getNamespace(); $pluginsIndexed[$pluginNamespace] = $plugin; } return $pluginsIndexed; }