CaseInsensitiveFieldAccessor
class CaseInsensitiveFieldAccessor implements FieldAccessorInterface (View source)
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, $fieldName, array $opts = [], bool $asObject = false)
No description
mixed
setValue(ViewableData $object, $fieldName, $value, array $opts = [])
No description
string|null
getObjectFieldName(ViewableData $object, $fieldName, array $opts = [])
No description