1 | <?php |
||
19 | class DeleteIndexCommand extends ContainerAwareCommand |
||
20 | { |
||
21 | /** |
||
22 | * @var SearchConfigurationChain |
||
23 | */ |
||
24 | private $configurationChain; |
||
25 | |||
26 | public function __construct(/* SearchConfigurationChain */ $configurationChain = null) |
||
27 | { |
||
28 | parent::__construct(); |
||
29 | |||
30 | if (!$configurationChain instanceof SearchConfigurationChain) { |
||
31 | @trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version symfony 3.4 and will be removed in symfony 4.0. If the command was registered by convention, make it a service instead. ', __METHOD__), E_USER_DEPRECATED); |
||
|
|||
32 | |||
33 | $this->setName(null === $configurationChain ? 'kuma:search:delete' : $configurationChain); |
||
34 | |||
35 | return; |
||
36 | } |
||
37 | |||
38 | $this->configurationChain = $configurationChain; |
||
39 | } |
||
40 | |||
41 | protected function configure() |
||
47 | |||
48 | /** |
||
49 | * @param InputInterface $input |
||
50 | * @param OutputInterface $output |
||
51 | * |
||
52 | * @return null|int null or 0 if everything went fine, or an error code |
||
53 | */ |
||
54 | protected function execute(InputInterface $input, OutputInterface $output) |
||
68 | } |
||
69 |
If you suppress an error, we recommend checking for the error condition explicitly: