Skip to content

Commit

Permalink
[Component][Serializer] Add fluent interface to GetSetMethodNormalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsegura committed Mar 4, 2014
1 parent bc38d76 commit 2d42533
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -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)
{
Expand All @@ -55,26 +57,36 @@ public function setCallbacks(array $callbacks)
}
}
$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;
}

/**
Expand Down

0 comments on commit 2d42533

Please sign in to comment.