承接 ghostwriter/collection 相关项目开发

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

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

ghostwriter/collection

最新稳定版本:2.0.0

Composer 安装命令:

composer require ghostwriter/collection

包简介

Provides a Collection implementation for PHP

README 文档

README

GitHub Sponsors Automation Supported PHP Version Downloads

Provides a Collection implementation for PHP.

Installation

You can install the package via composer:

composer require ghostwriter/collection

Star ⭐️ this repo if you find it useful

You can also star (????) this repo to find it easier later.

Usage

/** @var \Ghostwriter\Collection\Collection $collection */
$collection = Collection::new([1, 2, 3])
    ->append([4, 5, 6, 7, 8, 9])
    ->map(static fn ($v): int => $v * 10)
    ->filter(static fn ($v): bool => 0 === $v % 20);
    
$collection->toArray();  // [20, 40, 60, 80]
$collection->drop(1)     // [40, 60, 80]
           ->take(2)     // [40, 60]
           ->slice(1, 1) // [60]
           ->toArray();  // [60]

Credits

Thank you

Thank you for freely sharing your knowledge, insight and free time with me. I am grateful for your help and support.

Changelog

Please see CHANGELOG.md for more information on what has changed recently.

License

Please see LICENSE for more information on the license that applies to this project.

Security

Please see SECURITY.md for more information on security disclosure process.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固