function GetSetMethodNormalizer::isSetMethod
Checks if a method's name matches /^set.+$/ and can be called non-statically with one parameter.
2 calls to GetSetMethodNormalizer::isSetMethod()
- GetSetMethodNormalizer::isAllowedAttribute in vendor/
symfony/ serializer/ Normalizer/ GetSetMethodNormalizer.php - Is this attribute allowed?
- GetSetMethodNormalizer::supports in vendor/
symfony/ serializer/ Normalizer/ GetSetMethodNormalizer.php - Checks if the given class has any getter or setter method.
File
-
vendor/
symfony/ serializer/ Normalizer/ GetSetMethodNormalizer.php, line 98
Class
- GetSetMethodNormalizer
- Converts between objects with getter and setter methods and arrays.
Namespace
Symfony\Component\Serializer\NormalizerCode
private function isSetMethod(\ReflectionMethod $method) : bool {
return !$method->isStatic() && !$method->getAttributes(Ignore::class) && 0 < $method->getNumberOfParameters() && str_starts_with($method->name, 'set') && !ctype_lower($method->name[3]);
}