public function AbstractNormalizer::setCircularReferenceHandler in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Normalizer/AbstractNormalizer.php \Symfony\Component\Serializer\Normalizer\AbstractNormalizer::setCircularReferenceHandler()
Set circular reference handler.
Parameters
callable $circularReferenceHandler:
Return value
self
Throws
File
- vendor/
symfony/ serializer/ Normalizer/ AbstractNormalizer.php, line 94
Class
- AbstractNormalizer
- Normalizer implementation.
Namespace
Symfony\Component\Serializer\NormalizerCode
public function setCircularReferenceHandler($circularReferenceHandler) {
if (!is_callable($circularReferenceHandler)) {
throw new InvalidArgumentException('The given circular reference handler is not callable.');
}
$this->circularReferenceHandler = $circularReferenceHandler;
return $this;
}