承接 konfirm/qualityvalue 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

konfirm/qualityvalue

Composer 安装命令:

composer require konfirm/qualityvalue

包简介

Quality Values

关键字:

README 文档

README

Quality Values library for PHP (7+), for the parsing, sorting and filtering of Quality Value strings, such as the HTTP Accept(-Charset,-Encoding and -Language) headers.

Example use

<?php

use Konfirm\QualityValue\Collection;

$collection = Collection::fromString('foo,qux;q=0,baz;q=0.8,bar;q=1');

//  turn back into a string
$proper = (string) $collection;

//  "foo,bar,baz;q=.8"
//  - sorted on weight (original order if the weight is equal)
//  - 'bar' has its weight (q=) removed as it's 1, which is the default
//  - 'qux' is removed as the weight 0 indicates "not acceptable") 

foreach ($collection as $token) {
	print $token->getValue();  //  'foo' > 'bar' > 'baz'
}

//  obtain the first token 

$first = $collection->rewind();  //  Konfirm\QualityValue\Token
print $first->getValue();   // 'foo'
print $first->getWeight();  //  1


//  ...and the next
$next = $collection->next();  //  Konfirm\QualityValue\Token
print $first->getValue();   // 'bar'
print $first->getWeight();  //  1

//  etc

Features

  • PSR-4 autoloading compliant structure
  • Full code coverage with PHPUnit

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固