|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* TechDivision\Import\Cli\Command\DebugSendCommand |
|
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\InputArgument; |
|
24
|
|
|
use TechDivision\Import\Utils\CommandNames; |
|
25
|
|
|
use TechDivision\Import\Utils\InputArgumentKeysInterface; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* Command implementation that creates and sends a debug report via email. |
|
29
|
|
|
* |
|
30
|
|
|
* @author Marcus Döllerer <[email protected]> |
|
31
|
|
|
* @copyright 2020 TechDivision GmbH <[email protected]> |
|
32
|
|
|
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
33
|
|
|
* @link https://github.com/techdivision/import-cli |
|
34
|
|
|
* @link https://www.techdivision.com |
|
35
|
|
|
*/ |
|
36
|
|
|
class DebugSendCommand extends AbstractImportCommand |
|
37
|
|
|
{ |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Configures the current command. |
|
41
|
|
|
* |
|
42
|
|
|
* @return void |
|
43
|
|
|
* @see \Symfony\Component\Console\Command\Command::configure() |
|
44
|
|
|
*/ |
|
45
|
|
|
protected function configure() |
|
46
|
|
|
{ |
|
47
|
|
|
|
|
48
|
|
|
// initialize the command with the required/optional options |
|
49
|
|
|
$this->setName(CommandNames::DEBUG_SEND) |
|
|
|
|
|
|
50
|
|
|
->addArgument(InputArgumentKeysInterface::SHORTCUT, InputArgument::OPTIONAL, 'The shortcut that defines the operation(s) that has to be used for the import, one of "debug-send" or a combination of them', 'debug-send') |
|
51
|
|
|
->setDescription('Creates a debug dump and mails it to the specified recipient'); |
|
52
|
|
|
|
|
53
|
|
|
// invoke the parent method |
|
54
|
|
|
parent::configure(); |
|
55
|
|
|
} |
|
56
|
|
|
} |
|
57
|
|
|
|