class ProblemNormalizerContextBuilder
A helper providing autocompletion for available ProblemNormalizer options.
@author Mathias Arlaud <mathias.arlaud@gmail.com>
Hierarchy
- class \Symfony\Component\Serializer\Context\Normalizer\ProblemNormalizerContextBuilder implements \Symfony\Component\Serializer\Context\ContextBuilderInterface uses \Symfony\Component\Serializer\Context\ContextBuilderTrait
Expanded class hierarchy of ProblemNormalizerContextBuilder
File
-
vendor/
symfony/ serializer/ Context/ Normalizer/ ProblemNormalizerContextBuilder.php, line 23
Namespace
Symfony\Component\Serializer\Context\NormalizerView source
final class ProblemNormalizerContextBuilder implements ContextBuilderInterface {
use ContextBuilderTrait;
/**
* Configure the title field of normalized data.
*/
public function withTitle(?string $title) : static {
return $this->with(ProblemNormalizer::TITLE, $title);
}
/**
* Configure the type field of normalized data.
*/
public function withType(?string $type) : static {
return $this->with(ProblemNormalizer::TYPE, $type);
}
/**
* Configure the status field of normalized data.
*/
public function withStatusCode(int|string|null $statusCode) : static {
return $this->with(ProblemNormalizer::STATUS, $statusCode);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ContextBuilderTrait::$context | private | property | |
ContextBuilderTrait::toArray | public | function | |
ContextBuilderTrait::with | protected | function | |
ContextBuilderTrait::withContext | public | function | |
ProblemNormalizerContextBuilder::withStatusCode | public | function | Configure the status field of normalized data. |
ProblemNormalizerContextBuilder::withTitle | public | function | Configure the title field of normalized data. |
ProblemNormalizerContextBuilder::withType | public | function | Configure the type field of normalized data. |