From 2d425339644409f04d545a7d36535a258d8aa2a5 Mon Sep 17 00:00:00 2001 From: Alexandre Segura Date: Tue, 4 Mar 2014 15:24:09 +0100 Subject: [PATCH] [Component][Serializer] Add fluent interface to GetSetMethodNormalizer --- .../Serializer/Normalizer/GetSetMethodNormalizer.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index bfe7d61ce7..c651669133 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -46,6 +46,8 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal * @param callable[] $callbacks help normalize the result * * @throws InvalidArgumentException if a non-callable callback is set + * + * @return GetSetMethodNormalizer */ public function setCallbacks(array $callbacks) { @@ -55,26 +57,36 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal } } $this->callbacks = $callbacks; + + return $this; } /** * Set ignored attributes for normalization * * @param array $ignoredAttributes + * + * @return GetSetMethodNormalizer */ public function setIgnoredAttributes(array $ignoredAttributes) { $this->ignoredAttributes = $ignoredAttributes; + + return $this; } /** * Set attributes to be camelized on denormalize * * @param array $camelizedAttributes + * + * @return GetSetMethodNormalizer */ public function setCamelizedAttributes(array $camelizedAttributes) { $this->camelizedAttributes = $camelizedAttributes; + + return $this; } /**