/** * Executes the command cache:get. * * Display the information available about a cached value. * * @param InputInterface $input An InputInterface instance * @param OutputInterface $output An OutputInterface instance * * @return null */ protected function execute(InputInterface $input, OutputInterface $output) { $key = $input->getArgument('key'); if ($this->cache->_exists($key)) { $output->writeln('<info>' . $this->user->lang('VALUE') . $this->user->lang('COLON') . '</info>'); $value = $this->cache->get($key); if (is_array($value)) { $output->writeln(print_r($value, true), OutputInterface::OUTPUT_PLAIN); } else { $output->writeln($value, OutputInterface::OUTPUT_PLAIN); } } else { $output->writeln('<error>' . $this->user->lang('NICOFUMA_DEBUGTOOLS_CLI_CACHE_KEY_UNAVAILABLE', $key) . '</error>'); } }