1 | <?php |
||
8 | class ExecuteCode extends ActionAbstract |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $description; |
||
14 | |||
15 | /** |
||
16 | * @var callable |
||
17 | */ |
||
18 | protected $callback; |
||
19 | |||
20 | /** |
||
21 | * @param $description string Description of what this code does. |
||
22 | * @param $callback callable The callback to execute. The callback will receive $config, $input and $output as parameters. |
||
23 | */ |
||
24 | 1 | public function __construct($description, $callback) |
|
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function getName() |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function checkSupport() |
||
45 | |||
46 | /** |
||
47 | * Execute action for the given parameters. |
||
48 | * |
||
49 | * @param InputInterface $input |
||
50 | * @param OutputInterface $output |
||
51 | */ |
||
52 | 1 | public function execute(InputInterface $input, OutputInterface $output) |
|
56 | } |