tiagohillebrandt/php-parse-link-header 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tiagohillebrandt/php-parse-link-header

最新稳定版本:1.0.4

Composer 安装命令:

composer require tiagohillebrandt/php-parse-link-header

包简介

Parses the Link HTTP header and returns the values as an array.

README 文档

README

Parse the HTTP Link header and return the values as an array.

Installation with Composer

$ composer require tiagohillebrandt/php-parse-link-header

Usage

$headers = [ 'Link' => '<https://api.github.com/organizations/xyz/repos?page=2>; rel="next", <https://api.github.com/organizations/xyz/repos?page=4>; rel="last"', ]; $links = ( new TiagoHillebrandt\ParseLinkHeader( $headers['Link'] ) )->toArray(); print_r( $links );

The above example will output:

Array ( [next] => Array ( [link] => https://api.github.com/organizations/xyz/repos?page=2 [page] => 2 ) [last] => Array ( [link] => https://api.github.com/organizations/xyz/repos?page=4 [page] => 4 ) ) 

统计信息

  • 总下载量: 50.68k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 5
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04