if (0 === strpos($name, 'get') || 0 === strpos($name, 'has')) {
// getters and hassers
- $attributes[lcfirst(substr($name, 3))] = true;
+ $propertyName = substr($name, 3);
+
+ if (!$reflClass->hasProperty($propertyName)) {
+ $propertyName = lcfirst($propertyName);
+ }
+
+ $attributes[$propertyName] = true;
} elseif (strpos($name, 'is') === 0) {
// issers
- $attributes[lcfirst(substr($name, 2))] = true;
+ $propertyName = substr($name, 2);
+
+ if (!$reflClass->hasProperty($propertyName)) {
+ $propertyName = lcfirst($propertyName);
+ }
+
+ $attributes[$propertyName] = true;
}
}