| Total Complexity | 3 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class PurgeSiteCommand extends AbstractCommand |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $siteId; |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $resourcePattern; |
||
| 19 | |||
| 20 | protected function configure() |
||
| 21 | { |
||
| 22 | parent::configure(); |
||
| 23 | |||
| 24 | $this |
||
| 25 | ->setName('site:purge') |
||
| 26 | ->setDescription('Purge URLs from a given site id') |
||
| 27 | ->addArgument('site-id', InputArgument::REQUIRED, 'incapsula id of site to purge') |
||
| 28 | ->addArgument('resource-pattern', InputArgument::OPTIONAL, 'string to match in the URL to be purged', '') |
||
| 29 | ; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param InputInterface $input |
||
| 34 | * @param OutputInterface $output |
||
| 35 | */ |
||
| 36 | protected function initialize(InputInterface $input, OutputInterface $output) |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param InputInterface $input |
||
| 46 | * @param OutputInterface $output |
||
| 47 | * |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 57 |