1 | <?php |
||
34 | class OptionSubject extends AbstractAttributeSubject |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The ID of the option that has been created recently. |
||
39 | * |
||
40 | * @var integer |
||
41 | */ |
||
42 | protected $lastOptionId; |
||
43 | |||
44 | /** |
||
45 | * The value => option ID mapping. |
||
46 | * |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $attributeCodeValueOptionIdMapping = array(); |
||
50 | |||
51 | /** |
||
52 | * Map's the passed attribue code and value to the option ID that has been created recently. |
||
53 | * |
||
54 | * @param string $attributeCode The attriburte code that has to be mapped |
||
55 | * @param string $value The value that has to be mapped |
||
56 | * |
||
57 | * @return void |
||
58 | */ |
||
59 | public function addAddtributeCodeValueOptionIdMapping($attributeCode, $value) |
||
63 | |||
64 | /** |
||
65 | * Queries whether or not the attribute with the passed code/value has already been processed. |
||
66 | * |
||
67 | * @param string $attributeCode The attribute code to check |
||
68 | * @param string $value The option value to check |
||
69 | * |
||
70 | * @return boolean TRUE if the path has been processed, else FALSE |
||
71 | */ |
||
72 | public function hasBeenProcessed($attributeCode, $value) |
||
76 | |||
77 | /** |
||
78 | * Return's the ID of the attribute that has been created recently. |
||
79 | * |
||
80 | * @return integer The attribute ID |
||
81 | */ |
||
82 | public function getLastEntityId() |
||
86 | |||
87 | /** |
||
88 | * Set's the ID of the option that has been created recently. |
||
89 | * |
||
90 | * @param integer $lastOptionId The option ID |
||
91 | * |
||
92 | * @return void |
||
93 | */ |
||
94 | public function setLastOptionId($lastOptionId) |
||
98 | |||
99 | /** |
||
100 | * Return's the ID of the option that has been created recently. |
||
101 | * |
||
102 | * @return integer The option ID |
||
103 | */ |
||
104 | public function getLastOptionId() |
||
108 | |||
109 | /** |
||
110 | * Pre-load the option ID for the passed EAV attribute option. |
||
111 | * |
||
112 | * @param array $attributeOption The EAV attribute option with the ID that has to be pre-loaded |
||
113 | * |
||
114 | * @return void |
||
115 | */ |
||
116 | public function preLoadOptionId(array $attributeOption) |
||
120 | } |
||
121 |