CaseInsensitiveFieldAccessor
class CaseInsensitiveFieldAccessor
Infer original field name casing from case insensitive field comparison.
Useful counterpart to {@link \Convert::upperCamelToLowerCamel()}.
SilverStripe is using a mix of case sensitive and case insensitive checks, due to the nature of PHP (case sensitive for properties and array keys, case insensitive for methods).
Caution: Assumes fields have been whitelisted through GraphQL type definitions already. Does not perform any canView() checks or further validation.
Constants
HAS_METHOD |
|
HAS_FIELD |
|
HAS_SETTER |
|
DATAOBJECT |
|
Methods
mixed
getValue(ViewableData $object, string $fieldName, array $opts = [])
No description
mixed
setValue(ViewableData $object, string $fieldName, mixed $value, array $opts = [])
No description
null|string
getObjectFieldName(ViewableData $object, string $fieldName, array $opts = [])
No description