定制 mkloubert/php-linq 二次开发

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

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

mkloubert/php-linq

Composer 安装命令:

composer require mkloubert/php-linq

包简介

LINQ concept for PHP.

README 文档

README

A LINQ concept for PHP.

Most methods are chainable as in .NET context.

Here you can find the DOCUMENTATION in the wiki or the API documentation.

Features

Requirements

Example

A complete list can be found at the live example page.

use \System\Linq;

$seq = Enumerable::fromValues(5979, 23979, null, 23979, 1781, 241279);

$newSeq = $seq->select('$x => (string)$x')  // transform all values
                                            // to string
              ->where('$x => !empty($x)')    // filter out all values that are empty
              ->skip(1)    // skip the first element ('5979')
              ->take(3)    // take the next 3 elements from current position
                            // ('23979', '23979' and '1781')
              ->distinct()    // remove duplicates
              ->order();    // sort
                                    
foreach ($newSeq as $item) {
    // [0] '1781'
    // [1] '23979'
}

What you need

The file / directory structure:

System/
phpLINQ.php

Implemented

统计信息

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

GitHub 信息

  • Stars: 42
  • Watchers: 2
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-10-13