These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | namespace AOE\Crawler\Command; |
||
3 | |||
4 | /*************************************************************** |
||
5 | * Copyright notice |
||
6 | * |
||
7 | * (c) 2017 AOE GmbH <[email protected]> |
||
8 | * |
||
9 | * All rights reserved |
||
10 | * |
||
11 | * This script is part of the TYPO3 project. The TYPO3 project is |
||
12 | * free software; you can redistribute it and/or modify |
||
13 | * it under the terms of the GNU General Public License as published by |
||
14 | * the Free Software Foundation; either version 3 of the License, or |
||
15 | * (at your option) any later version. |
||
16 | * |
||
17 | * The GNU General Public License can be found at |
||
18 | * http://www.gnu.org/copyleft/gpl.html. |
||
19 | * |
||
20 | * This script is distributed in the hope that it will be useful, |
||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
23 | * GNU General Public License for more details. |
||
24 | * |
||
25 | * This copyright notice MUST APPEAR in all copies of the script! |
||
26 | ***************************************************************/ |
||
27 | |||
28 | use TYPO3\CMS\Core\Controller\CommandLineController; |
||
29 | |||
30 | /** |
||
31 | * Class FlushCommandLineController |
||
32 | * |
||
33 | * @package AOE\Crawler\Command |
||
34 | * @codeCoverageIgnore |
||
35 | */ |
||
36 | class FlushCommandLineController extends CommandLineController |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Constructor |
||
41 | * |
||
42 | * @return void |
||
0 ignored issues
–
show
|
|||
43 | */ |
||
44 | public function __construct() |
||
45 | { |
||
46 | parent::__construct(); |
||
47 | |||
48 | // Adding options to help archive: |
||
49 | $this->cli_options[] = ['-o mode', 'Output mode: "finished", "all", "pending"', "Specifies the type queue entries which is flushed in the process."]; |
||
50 | # $this->cli_options[] = array('-v level', 'Verbosity level 0-3', "The value of level can be:\n 0 = all output\n 1 = info and greater (default)\n 2 = warnings and greater\n 3 = errors"); |
||
51 | |||
52 | // Setting help texts: |
||
53 | $this->cli_help['name'] = 'crawler CLI interface -- Cleaning up the queue.'; |
||
54 | $this->cli_help['synopsis'] = 'page_id ###OPTIONS###'; |
||
55 | $this->cli_help['description'] = "Works as a CLI interface to some functionality from the Web > Info > Site Crawler module; It will remove queue entires and perform a cleanup."; |
||
56 | $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler_flush 5 -o=finished\nWill remove all finished queue-entries in the sub-branch of page 5\n"; |
||
57 | $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler_flush 0 -o=all\nWill remove all queue-entries for every page\n"; |
||
58 | $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2009'; |
||
59 | } |
||
60 | } |
||
61 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.