@@ 80-108 (lines=29) @@ | ||
77 | } |
|
78 | ||
79 | // query whether or not we're in debug mode |
|
80 | if ($this->isDebugMode()) { |
|
81 | // log a warning and continue with the next value |
|
82 | $this->getSystemLogger()->warning( |
|
83 | $this->appendExceptionSuffix( |
|
84 | sprintf( |
|
85 | 'Can\'t map option value "%s" for attribute %s to a boolean representation', |
|
86 | $attributeValue, |
|
87 | $attributeCode |
|
88 | ) |
|
89 | ) |
|
90 | ); |
|
91 | ||
92 | // add the missing option value to the registry |
|
93 | $this->mergeAttributesRecursive( |
|
94 | array( |
|
95 | RegistryKeys::MISSING_OPTION_VALUES => array( |
|
96 | $attributeCode => array( |
|
97 | $attributeValue => array( |
|
98 | $this->raiseCounter($attributeValue), |
|
99 | array($this->getUniqueIdentifier() => true) |
|
100 | ) |
|
101 | ) |
|
102 | ) |
|
103 | ) |
|
104 | ); |
|
105 | ||
106 | // return NULL, if NO value can be mapped to a boolean representation |
|
107 | return; |
|
108 | } |
|
109 | ||
110 | // throw an exception if the attribute is not available |
|
111 | throw new \Exception( |
@@ 80-108 (lines=29) @@ | ||
77 | } |
|
78 | ||
79 | // query whether or not we're in debug mode |
|
80 | if ($this->isDebugMode()) { |
|
81 | // log a warning and continue with the next value |
|
82 | $this->getSystemLogger()->warning( |
|
83 | $this->appendExceptionSuffix( |
|
84 | sprintf( |
|
85 | 'Can\'t find multiselect option value "%s" for attribute "%s"', |
|
86 | $val, |
|
87 | $attributeCode |
|
88 | ) |
|
89 | ) |
|
90 | ); |
|
91 | ||
92 | // add the missing option value to the registry |
|
93 | $this->mergeAttributesRecursive( |
|
94 | array( |
|
95 | RegistryKeys::MISSING_OPTION_VALUES => array( |
|
96 | $attributeCode => array( |
|
97 | $val => array( |
|
98 | $this->raiseCounter($val), |
|
99 | array($this->getUniqueIdentifier() => true) |
|
100 | ) |
|
101 | ) |
|
102 | ) |
|
103 | ) |
|
104 | ); |
|
105 | ||
106 | // continue with the next option value |
|
107 | continue; |
|
108 | } |
|
109 | ||
110 | // throw an exception if the attribute is not available |
|
111 | throw new \Exception( |
@@ 71-99 (lines=29) @@ | ||
68 | } |
|
69 | ||
70 | // query whether or not we're in debug mode |
|
71 | if ($this->isDebugMode()) { |
|
72 | // log a warning and return immediately |
|
73 | $this->getSystemLogger()->warning( |
|
74 | $this->appendExceptionSuffix( |
|
75 | sprintf( |
|
76 | 'Can\'t find select option value "%s" for attribute "%s"', |
|
77 | $attributeValue, |
|
78 | $attributeCode |
|
79 | ) |
|
80 | ) |
|
81 | ); |
|
82 | ||
83 | // add the missing option value to the registry |
|
84 | $this->mergeAttributesRecursive( |
|
85 | array( |
|
86 | RegistryKeys::MISSING_OPTION_VALUES => array( |
|
87 | $attributeCode => array( |
|
88 | $attributeValue => array( |
|
89 | $this->raiseCounter($attributeValue), |
|
90 | array($this->getUniqueIdentifier() => true) |
|
91 | ) |
|
92 | ) |
|
93 | ) |
|
94 | ) |
|
95 | ); |
|
96 | ||
97 | // return NULL, if the value can't be mapped to an option |
|
98 | return; |
|
99 | } |
|
100 | ||
101 | // throw an exception if the attribute is NOT |
|
102 | // available and we're not in debug mode |