/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * * @return void */ protected function execute(InputInterface $input, OutputInterface $output) { $version = new Version(); $version->setRequest($this->request); $version = $version->getInfo(); $this->out('Magento Information', [['type' => 'table', 'data' => [['Parameter', 'Value'], [['Edition', $version[0] ?: 'Unknown'], ['Version', $version[1] ?: 'Unknown']]]]]); }
/** * Check for Magento version * * @return void */ public function checkMagentoinfo() { $version = new Version(); $version->setRequest($this->request); $version = $version->getInfo(); $rows = [['Edition', $version[0] ?: 'Unknown'], ['Version', $version[1] ?: 'Unknown']]; $this->respond(['body' => $rows]); }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * * @return void */ protected function execute(InputInterface $input, OutputInterface $output) { $this->writeHeader('Magento Information'); $version = new Version(); $version->setRequest($this->request); $version = $version->getInfo($this->url); $rows = array(array('Edition', $version[0] ?: 'Unknown'), array('Version', $version[1] ?: 'Unknown')); $table = new Table($this->output); $table->setHeaders(array('Parameter', 'Value'))->setRows($rows)->render(); }