ConsoleCommand.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * @package Grav\Console
  4. *
  5. * @copyright Copyright (C) 2015 - 2019 Trilby Media, LLC. All rights reserved.
  6. * @license MIT License; see LICENSE file for details.
  7. */
  8. namespace Grav\Console;
  9. use Grav\Common\Grav;
  10. use Symfony\Component\Console\Command\Command;
  11. use Symfony\Component\Console\Input\InputInterface;
  12. use Symfony\Component\Console\Output\OutputInterface;
  13. class ConsoleCommand extends Command
  14. {
  15. use ConsoleTrait;
  16. /**
  17. * @param InputInterface $input
  18. * @param OutputInterface $output
  19. *
  20. * @return int|null|void
  21. */
  22. protected function execute(InputInterface $input, OutputInterface $output)
  23. {
  24. $this->setupConsole($input, $output);
  25. $this->serve();
  26. }
  27. /**
  28. *
  29. */
  30. protected function serve()
  31. {
  32. }
  33. protected function displayGPMRelease()
  34. {
  35. $this->output->writeln('');
  36. $this->output->writeln('GPM Releases Configuration: <yellow>' . ucfirst(Grav::instance()['config']->get('system.gpm.releases')) . '</yellow>');
  37. $this->output->writeln('');
  38. }
  39. }