1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* TechDivision\Import\Cli\Command\ImportDebugCommand |
5
|
|
|
* |
6
|
|
|
* NOTICE OF LICENSE |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
9
|
|
|
* that is available through the world-wide-web at this URL: |
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
11
|
|
|
* |
12
|
|
|
* PHP version 7 |
13
|
|
|
* |
14
|
|
|
* @author Marcus Döllerer <[email protected]> |
15
|
|
|
* @copyright 2020 TechDivision GmbH <[email protected]> |
16
|
|
|
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
17
|
|
|
* @link https://github.com/techdivision/import-cli |
18
|
|
|
* @link https://www.techdivision.com |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace TechDivision\Import\Cli\Command; |
22
|
|
|
|
23
|
|
|
use Symfony\Component\Console\Input\InputOption; |
24
|
|
|
use Symfony\Component\Console\Input\InputArgument; |
25
|
|
|
use TechDivision\Import\Utils\CommandNames; |
26
|
|
|
use TechDivision\Import\Utils\InputArgumentKeysInterface; |
27
|
|
|
use TechDivision\Import\Utils\InputOptionKeysInterface; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Command implementation that provides debugging functionality. |
31
|
|
|
* |
32
|
|
|
* @author Marcus Döllerer <[email protected]> |
33
|
|
|
* @copyright 2020 TechDivision GmbH <[email protected]> |
34
|
|
|
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
35
|
|
|
* @link https://github.com/techdivision/import-cli |
36
|
|
|
* @link https://www.techdivision.com |
37
|
|
|
*/ |
38
|
|
|
class ImportDebugCommand extends AbstractImportCommand |
39
|
|
|
{ |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Configures the current command. |
43
|
|
|
* |
44
|
|
|
* @return void |
45
|
|
|
* @see \Symfony\Component\Console\Command\Command::configure() |
46
|
|
|
*/ |
47
|
|
|
protected function configure() |
48
|
|
|
{ |
49
|
|
|
|
50
|
|
|
// initialize the command with the required/optional options |
51
|
|
|
$this->setName(CommandNames::IMPORT_DEBUG) |
52
|
|
|
->addArgument(InputArgumentKeysInterface::SHORTCUT, InputArgument::OPTIONAL, 'The shortcut that defines the operation(s) that has to be used for debugging the import, one of "send" or a combination of them', 'send') |
53
|
|
|
->addOption(InputOptionKeysInterface::RENDER_DEBUG_SERIALS, null, InputOption::VALUE_OPTIONAL, 'The number of debug serials rendered on the console', 10) |
54
|
|
|
->setDescription('Creates a debug dump and mails it to the specified recipient'); |
55
|
|
|
|
56
|
|
|
// invoke the parent method |
57
|
|
|
parent::configure(); |
58
|
|
|
} |
59
|
|
|
} |
60
|
|
|
|