/** * {@inheritDoc} */ public function postSend(RequestInterface $request, MessageInterface $response) { $header = $response->getHeader('Link'); if (empty($header)) { return null; } $pagination = array(); foreach (explode(',', $header) as $link) { preg_match('/<(.*)>; rel="(.*)"/i', trim($link, ','), $match); if (3 === count($match)) { $pagination[$match[2]] = $match[1]; } } $response->setPagination($pagination); }