Skip to content

Commit 477dc63

Browse files
authored
Merge pull request #22 from contentful/feat/link-collection
Add resolveLinkCollection to LinkResolverInterface
2 parents dde6c54 + d595ac2 commit 477dc63

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Api/LinkResolverInterface.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,17 @@ interface LinkResolverInterface
2222
* @return ResourceInterface
2323
*/
2424
public function resolveLink(Link $link, array $parameters = []): ResourceInterface;
25+
26+
/**
27+
* Resolves an array of links.
28+
* A method implementing this may apply some optimizations
29+
* to reduce the amount of necessary API calls, or simply forward this
30+
* to the "resolveLink" method.
31+
*
32+
* @param Link[] $links
33+
* @param string|null $locale
34+
*
35+
* @return ResourceInterface[]
36+
*/
37+
public function resolveLinkCollection(array $links, string $locale = \null): array;
2538
}

0 commit comments

Comments
 (0)