private function patchAbsolute(Relation $relation, $absolute) { $href = $relation->getHref(); if ($href instanceof Route) { $href = new Route($href->getName(), $href->getParameters(), $absolute, $href->getGenerator()); } return new Relation($relation->getName(), $href, $relation->getEmbed(), $relation->getAttributes(), $relation->getExclusion()); }
private function shouldSkipRelation($object, Relation $relation, SerializationContext $context) { return $this->shouldSkip($object, $relation->getExclusion(), $context); }
/** * @param Relation $relation * @return Relation */ private function transformRelation(Relation $relation) { return new Relation($relation->getName(), $relation->getHref(), $relation->getEmbedded(), $relation->getAttributes(), $this->transformExclusion($relation->getExclusion())); }