2017 © Pedro Peláez
 

library php-linq

LINQ concept for PHP.

image

mkloubert/php-linq

LINQ concept for PHP.

  • Wednesday, November 18, 2015
  • by mkloubert
  • Repository
  • 1 Watchers
  • 3 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

phpLINQ

A LINQ concept for PHP., (*1)

Most methods are chainable as in .NET context., (*2)

Here you can find the DOCUMENTATION in the wiki or the API documentation., (*3)

Features

Requirements

Example

A complete list can be found at the live example page., (*4)

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:, (*5)

System/
phpLINQ.php

Implemented

The Versions

18/11 2015

dev-master

9999999-dev

LINQ concept for PHP.

  Sources   Download

BSD-3-Clause

by Marcel Joachim Kloubert