Skip to content
Snippets Groups Projects
Select Git revision
  • 4473225451c293d5cd6afe5fa1a73ea522a2e824
  • main default protected
  • register-logging-channel
  • expr-lang
  • ci-82
  • attr-events
  • locale-wip
  • custom-routes
  • v0.1.85
  • v0.1.84
  • v0.1.83
  • v0.1.82
  • v0.1.81
  • v0.1.80
  • v0.1.79
  • v0.1.78
  • v0.1.77
  • v0.1.76
  • v0.1.75
  • v0.1.74
  • v0.1.73
  • v0.1.72
  • v0.1.71
  • v0.1.70
  • v0.1.69
  • v0.1.68
  • v0.1.67
  • v0.1.65
28 results

LocalDataAwareEvent.php

Blame
  • TestCommand.php 1.00 KiB
    <?php
    
    declare(strict_types=1);
    
    namespace Dbp\Relay\ExampleBundle\Command;
    
    use Symfony\Component\Console\Command\Command;
    use Symfony\Component\Console\Input\InputArgument;
    use Symfony\Component\Console\Input\InputInterface;
    use Symfony\Component\Console\Output\OutputInterface;
    
    /**
     * This is an example command.
     * You can execute it with "php bin/console dbp:my-custom-command my-argument".
     * Change "my-custom-command" to a more meaningful name in $defaultName.
     */
    class TestCommand extends Command
    {
        protected static $defaultName = 'dbp:my-custom-command';
    
        public function __construct()
        {
            parent::__construct();
        }
    
        protected function configure()
        {
            $this->addArgument('argument', InputArgument::REQUIRED, 'Example.');
            $this->setDescription('Hey there!');
        }
    
        protected function execute(InputInterface $input, OutputInterface $output): int
        {
            $argument = $input->getArgument('argument');
            $output->writeln($argument);
    
            return 0;
        }
    }