CacheTool\Command\ApcuKeyFetchCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->ensureExtensionLoaded('apcu');
        $key = $input->getArgument('key');
        $success = new \stdClass();
        $value = $this->getCacheTool()->apcu_fetch($key, $success);
        if ($success->success) {
            $output->writeln(sprintf("<comment>APCu key=<info>{$key}</info> has value=<info>%1\$s</info></comment>", var_export($value, true)));
        } else {
            $output->writeln("<comment>APCu key=<info>{$key}</info> does not exist.</comment>");
            return 1;
        }
    }
ApcuKeyFetchCommand