zuffik/srvant 问题修复 & 功能扩展

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

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

zuffik/srvant

Composer 安装命令:

composer require zuffik/srvant

包简介

Data structures and object wrappers for primitive data types

README 文档

README

ant

srvant

srvant is your little but helpful package that improves PHP usability.

Donate

Docs

Installation

simply...

composer require zuffik/srvant

Usage

Structures

Lists:

  • Array List
  • Linked List

Maps:

  • Hash map

example:

$list = new ArrayList();
$list->add(1, 2, 3, -1);
foreach($list as $item) {
	echo $item . "\n";
}
// And equivalent
$list->map(function($item) {
	echo $item . "\n";
	return $item;
})->filter(function($item) {
	return $item > 0;
});
// And many more

Full documentation available here.

String

Offers interface with string functions.

example:

$str = string('Hallo world')
	->replace('a', 'e')
	->lowerCase()
	->slugify()
	->upperCase();
echo $str; // HELLO-WORLD

Full documentation available here.

Formats

  • CSV
  • JSON
  • Regex
  • URL

All of these offer a interface for work with certain data format.

example:

$url = new URL('http://sub.example.com/index.php?action=page');
echo $url->getDomain(); // example
echo $url->getRequestedUrl(); // index.php

Full documentation available here.

There are planned many features in future.

Sources

As for mime types, this magic database is used

Contribution

Contribution is simple. Make pull request with your new or edited code. It MUST follow PSR coding standards. For new feature provide also unit tests.

Donate

If you are satisfied with srvant, please donate. Thank you all. :)

Donate

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固