定制 bogosoft/collections 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

bogosoft/collections

Composer 安装命令:

composer require bogosoft/collections

包简介

Contracts and implementations for working with sequences and collections.

README 文档

README

This library contains the Sequence class for fluently working with and modifying sequences of items.

The Sequence class implements the following interfaces:

  • Countable
  • IteratorAggregate

Requirements

  • PHP >= 7.4

Installation

composer require bogosoft/collections

Utility Functions

The following functions all return an instance of the Sequence class or provide Sequence-like logic in a functional manner.

Function Description
all(iterable, callable) Determine if all of the items in a given sequence match a given condition.
any(iterable, ?callable) Determine if any item in the given sequence matches a given condition.
filter(iterable, callable) Filter an array or Traversable and return a new Sequence
seq(iterable) Creates a sequence from an iterable source (i.e., an array or anything that implements Traversable).
seqi(mixed, callable) Create a sequence from a singleton seed value and an expansion function.
seqv(mixed ... $items) Creates a sequence from zero or more variadic arguments.
sort(iterable, ?callable) Sort a sequence with an optional comparer.
sortc(iterable, bool) Sort a sequence of IComparable objects in either ascending or descending order.

Sequence Methods

  • all
  • any
  • append
  • apply
  • collect
  • count
  • filter
  • fold
  • getFirst
  • getFirstOrDefault
  • getLast
  • getLastOrDefault
  • getSingle
  • getSingleOrDefault
  • iter
  • map
  • prepend
  • skip
  • sort
  • sortc
  • take
  • toArray

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固