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 CrawlerCommandLineController |
||
32 | * |
||
33 | * @package AOE\Crawler\Command |
||
34 | * @codeCoverageIgnore |
||
35 | */ |
||
36 | class CrawlerCommandLineController 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 | $this->cli_options[] = ['-h', 'Show the help', '']; |
||
49 | $this->cli_options[] = ['--help', 'Same as -h', '']; |
||
50 | $this->cli_options[] = ['--countInARun count', 'Amount of pages', 'How many pages should be crawled during that run.']; |
||
51 | $this->cli_options[] = ['--sleepTime milliseconds', 'Millisecounds to relax system during crawls', 'Amount of millisecounds which the system should use to relax between crawls.']; |
||
52 | $this->cli_options[] = ['--sleepAfterFinish seconds', 'Secounds to relax system after all crawls.', 'Amount of secounds which the system should use to relax after all crawls are done.']; |
||
53 | |||
54 | // Setting help texts: |
||
55 | $this->cli_help['name'] = 'crawler CLI interface -- Crawling the URLs from the queue'; |
||
56 | $this->cli_help['synopsis'] = '###OPTIONS###'; |
||
57 | $this->cli_help['description'] = ""; |
||
58 | $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler\nWill trigger the crawler which starts to process the queue entires\n"; |
||
59 | $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2010'; |
||
60 | } |
||
61 | } |
||
62 |
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.