Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf15ea50

Browse files
committed
minor#10376 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer (alexsegura)
This PR was merged into the 2.5-dev branch.Discussion----------[Component][Serializer] Add fluent interface to GetSetMethodNormalizer| Q | A| ------------- | ---| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | N/A| License | MIT| Doc PR | N/ACommits-------2d42533 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer
2 parentsbc38d76 +2d42533 commitf15ea50

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
4646
* @param callable[] $callbacks help normalize the result
4747
*
4848
* @throws InvalidArgumentException if a non-callable callback is set
49+
*
50+
* @return GetSetMethodNormalizer
4951
*/
5052
publicfunctionsetCallbacks(array$callbacks)
5153
{
@@ -55,26 +57,36 @@ public function setCallbacks(array $callbacks)
5557
}
5658
}
5759
$this->callbacks =$callbacks;
60+
61+
return$this;
5862
}
5963

6064
/**
6165
* Set ignored attributes for normalization
6266
*
6367
* @param array $ignoredAttributes
68+
*
69+
* @return GetSetMethodNormalizer
6470
*/
6571
publicfunctionsetIgnoredAttributes(array$ignoredAttributes)
6672
{
6773
$this->ignoredAttributes =$ignoredAttributes;
74+
75+
return$this;
6876
}
6977

7078
/**
7179
* Set attributes to be camelized on denormalize
7280
*
7381
* @param array $camelizedAttributes
82+
*
83+
* @return GetSetMethodNormalizer
7484
*/
7585
publicfunctionsetCamelizedAttributes(array$camelizedAttributes)
7686
{
7787
$this->camelizedAttributes =$camelizedAttributes;
88+
89+
return$this;
7890
}
7991

8092
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp