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
|
@@ 210-218 (lines=9) @@
|
| 207 |
|
* @default a [] |
| 208 |
|
* @default foo [] |
| 209 |
|
*/ |
| 210 |
|
public function testSymfony(InputInterface $input) |
| 211 |
|
{ |
| 212 |
|
$a = $input->getArgument('a'); |
| 213 |
|
$this->say("The parameters passed are:\n" . var_export($a, true)); |
| 214 |
|
$foo = $input->getOption('foo'); |
| 215 |
|
if (!empty($foo)) { |
| 216 |
|
$this->say("The options passed via --foo are:\n" . var_export($foo, true)); |
| 217 |
|
} |
| 218 |
|
} |
| 219 |
|
} |
| 220 |
|
|