examples/src/Robo/Plugin/Commands/ExampleCommands.php 1 location
|
@@ 181-189 (lines=9) @@
|
| 178 |
|
* @default a [] |
| 179 |
|
* @default foo [] |
| 180 |
|
*/ |
| 181 |
|
public function trySymfony(InputInterface $input) |
| 182 |
|
{ |
| 183 |
|
$a = $input->getArgument('a'); |
| 184 |
|
$this->say("The parameters passed are:\n" . var_export($a, true)); |
| 185 |
|
$foo = $input->getOption('foo'); |
| 186 |
|
if (!empty($foo)) { |
| 187 |
|
$this->say("The options passed via --foo are:\n" . var_export($foo, true)); |
| 188 |
|
} |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
/** |
| 192 |
|
* Demonstrate Robo boolean options. |
tests/src/RoboFileFixture.php 1 location
|
@@ 224-232 (lines=9) @@
|
| 221 |
|
* @default a [] |
| 222 |
|
* @default foo [] |
| 223 |
|
*/ |
| 224 |
|
public function testSymfony(InputInterface $input) |
| 225 |
|
{ |
| 226 |
|
$a = $input->getArgument('a'); |
| 227 |
|
$this->say("The parameters passed are:\n" . var_export($a, true)); |
| 228 |
|
$foo = $input->getOption('foo'); |
| 229 |
|
if (!empty($foo)) { |
| 230 |
|
$this->say("The options passed via --foo are:\n" . var_export($foo, true)); |
| 231 |
|
} |
| 232 |
|
} |
| 233 |
|
} |
| 234 |
|
|