1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* TechDivision\Import\Configuration\Jms\Configuration\ExecutionContext |
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 5 |
13
|
|
|
* |
14
|
|
|
* @author Tim Wagner <[email protected]> |
15
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
17
|
|
|
* @link https://github.com/techdivision/import-configuration-jms |
18
|
|
|
* @link http://www.techdivision.com |
19
|
|
|
*/ |
20
|
|
|
namespace TechDivision\Import\Configuration\Jms\Configuration; |
21
|
|
|
|
22
|
|
|
use TechDivision\Import\Configuration\ExecutionContextConfigurationInterface; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Class that contains data about the actual execution context. |
26
|
|
|
* |
27
|
|
|
* @author Tim Wagner <[email protected]> |
28
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
29
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
30
|
|
|
* @link https://github.com/techdivision/import-configuration-jms |
31
|
|
|
* @link http://www.techdivision.com |
32
|
|
|
*/ |
33
|
|
|
class ExecutionContext implements ExecutionContextConfigurationInterface |
34
|
|
|
{ |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* The Magento Edition to use in the actual execution context. |
38
|
|
|
* |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
private $magentoEdition; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* The Entity Type Code to use in the actual execution context. |
45
|
|
|
* |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
private $entityTypeCode; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Initialize the instance with the actual context data. |
52
|
|
|
* |
53
|
|
|
* @param string $magentoEdition The Magento Edition to use in the actual execution context |
54
|
|
|
* @param string $entityTypeCode The Entity Type Code to use in the actual execution context |
55
|
|
|
*/ |
56
|
|
|
public function __construct($magentoEdition, $entityTypeCode) |
57
|
|
|
{ |
58
|
|
|
$this->magentoEdition = $magentoEdition; |
59
|
|
|
$this->entityTypeCode = $entityTypeCode; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Return's the Magento Edition to use in the actual execution context. |
64
|
|
|
* |
65
|
|
|
* @return string The Magento Edition |
66
|
|
|
*/ |
67
|
|
|
public function getMagentoEditiion() |
68
|
|
|
{ |
69
|
|
|
return $this->magentoEdition; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* Return's the Entity Type Code to use in the actual execution context. |
74
|
|
|
* |
75
|
|
|
* @return string The Entity Type |
76
|
|
|
*/ |
77
|
|
|
public function getEntityTypeCode() |
78
|
|
|
{ |
79
|
|
|
return $this->entityTypeCode; |
80
|
|
|
} |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
|