src/ArtaxServiceBuilder/Service/GithubPaginator.php
public function parseLinksHeaders(array $linkHeaders) {

        $links = array();

        foreach ($linkHeaders as $linkHeader) {
            $linkInfoArray = \HTTP2\HTTP2::parseLinks($linkHeader);

            foreach ($linkInfoArray as $linkInfo) {
                $url = null;
                $description = null;
                
                if (isset($linkInfo['_uri']) == true) {
                    $url = $linkInfo['_uri'];
                }
                
                if (isset($linkInfo['rel']) == true) {
                    $relInfo = $linkInfo['rel'];
                    if (is_array($relInfo)) {
                        foreach ($relInfo as $linkType) {
                            $description = $linkType;
                        }
                    }
                }

                if ($url != null && $description != null) {
                    //Check that it's not a new type that we don't understand
                    if (in_array($description, self::$linkTypes)) {
                        $links[$description] = new Link($url, $description);
                    }
                }
            }
        }

        $this->links = $links;
    }
public function parseLinksHeaders(array $linkHeaders) {

        $links = array();

        foreach ($linkHeaders as $linkHeader) {
            $linkInfoArray = \HTTP2\HTTP2::parseLinks($linkHeader);

            foreach ($linkInfoArray as $linkInfo) {
                $url = null;
                $description = null;
                
                if (isset($linkInfo['_uri']) == true) {
                    $url = $linkInfo['_uri'];
                }
                
                if (isset($linkInfo['rel']) == true) {
                    $relInfo = $linkInfo['rel'];
                    if (is_array($relInfo)) {
                        foreach ($relInfo as $linkType) {
                            $description = $linkType;
                        }
                    }
                }

                if ($url != null && $description != null) {
                    //Check that it's not a new type that we don't understand
                    if (in_array($description, self::$linkTypes)) {
                        $links[$description] = new Link($url, $description);
                    }
                }
            }
        }

        $this->links = $links;
    }
Extract the link header(s) as parse the RFC 5988 style links from them.
fyi RFC 5988 is a terrible idea. It means to cache a response, you now need to
cache both the body data return as well as the headers.
@return \ArtaxServiceBuilder\Service\Link[]