-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCrazyCommand.php
More file actions
26 lines (21 loc) · 799 Bytes
/
CrazyCommand.php
File metadata and controls
26 lines (21 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
declare(strict_types=1);
namespace In2code\In2template\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;
class CrazyCommand extends Command
{
protected function configure()
{
$this->addArgument('argumentOne', InputArgument::OPTIONAL, 'beschreibung', 'test');
$this->addArgument('argumentTwo', InputArgument::OPTIONAL, 'beschreibung', 'test');
}
public function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln($input->getArgument('argumentOne'));
$output->writeln($input->getArgument('argumentTwo'));
return Command::SUCCESS;
}
}