| @@ 449-458 (lines=10) @@ | ||
| 446 | * |
|
| 447 | * @return self|EncoderInterface |
|
| 448 | */ |
|
| 449 | public function withRelationshipSelfLink($resource, string $relationshipName): EncoderInterface |
|
| 450 | { |
|
| 451 | $link = $this |
|
| 452 | ->getSchemaContainer()->getSchema($resource) |
|
| 453 | ->getRelationshipSelfLink($resource, $relationshipName); |
|
| 454 | ||
| 455 | return $this->withLinks([ |
|
| 456 | LinkInterface::SELF => $link, |
|
| 457 | ]); |
|
| 458 | } |
|
| 459 | ||
| 460 | /** |
|
| 461 | * @param mixed $resource |
|
| @@ 466-475 (lines=10) @@ | ||
| 463 | * |
|
| 464 | * @return self|EncoderInterface |
|
| 465 | */ |
|
| 466 | public function withRelationshipRelatedLink($resource, string $relationshipName): EncoderInterface |
|
| 467 | { |
|
| 468 | $link = $this |
|
| 469 | ->getSchemaContainer()->getSchema($resource) |
|
| 470 | ->getRelationshipRelatedLink($resource, $relationshipName); |
|
| 471 | ||
| 472 | return $this->withLinks([ |
|
| 473 | LinkInterface::RELATED => $link, |
|
| 474 | ]); |
|
| 475 | } |
|
| 476 | ||
| 477 | /** |
|
| 478 | * @param iterable $value |
|