1 | <?php |
||
15 | class ResetCommand extends ContainerAwareCommand |
||
16 | { |
||
17 | /** |
||
18 | * @var IndexManager |
||
19 | */ |
||
20 | private $indexManager; |
||
21 | |||
22 | /** |
||
23 | * @var Resetter |
||
24 | */ |
||
25 | private $resetter; |
||
26 | |||
27 | /** |
||
28 | * @see Symfony\Component\Console\Command\Command::configure() |
||
29 | */ |
||
30 | 3 | protected function configure() |
|
31 | { |
||
32 | $this |
||
33 | 3 | ->setName('fos:elastica:reset') |
|
34 | 3 | ->addOption('index', null, InputOption::VALUE_OPTIONAL, 'The index to reset') |
|
35 | 3 | ->addOption('type', null, InputOption::VALUE_OPTIONAL, 'The type to reset') |
|
36 | 3 | ->addOption('force', null, InputOption::VALUE_NONE, 'Force index deletion if same name as alias') |
|
37 | 3 | ->setDescription('Reset search indexes') |
|
38 | ; |
||
39 | 3 | } |
|
40 | |||
41 | /** |
||
42 | * @see Symfony\Component\Console\Command\Command::initialize() |
||
43 | */ |
||
44 | 3 | protected function initialize(InputInterface $input, OutputInterface $output) |
|
49 | |||
50 | /** |
||
51 | * @see Symfony\Component\Console\Command\Command::execute() |
||
52 | */ |
||
53 | 3 | protected function execute(InputInterface $input, OutputInterface $output) |
|
78 | } |
||
79 |