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