Download the PHP package sanmai/lazy-linq without Composer

On this page you can find all versions of the php package sanmai/lazy-linq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lazy-linq

Build Status Coverage Status Infection MSI Codacy Badge Maintainability

This library implements most of the API methods from .NET static class System.Linq.Enumerable which do not require having the whole data set in memory. If you're used to LINQ query operations from .NET, you should feel like home.

Powered by generators, this library works in a lazy way: instead of doing computing on the whole sequence at once, it would only do necessary computing while you're iterating through the sequence.

Install

composer require sanmai/lazy-linq

API Compatibility

Method Details
:heavy_check_mark: Aggregate()
:heavy_check_mark: All()
:heavy_check_mark: Any()
:heavy_check_mark: Append() Returns a new collection.
AsEnumerable() Not applicable to PHP.
:heavy_check_mark: Average()
:heavy_check_mark: Cast()
:heavy_check_mark: Concat()
:heavy_check_mark: Contains()
:heavy_check_mark: Count()
DefaultIfEmpty() Not applicable.
:heavy_check_mark: Distinct() Only removes repeated elements, think uniq.
:heavy_check_mark: ElementAt() @throws :bomb:
:heavy_check_mark: ElementAtOrDefault() Always a null default value, @throws :bomb:
:heavy_check_mark: Empty() Returns a new empty collection.
:heavy_check_mark: Except() Returns a new collection.
:heavy_check_mark: First()
FirstOrDefault() Collections are not typed in PHP.
GroupBy() Needs all data at once.
GroupJoin()
Intersect()
Join()
:heavy_check_mark: Last()
LastOrDefault() Not applicable.
LongCount() No separate long type in PHP.
:heavy_check_mark: Max()
:heavy_check_mark: Min()
:heavy_check_mark: OfType() There's also ofClass() for classes.
OrderBy() Needs to have the whole set of data in memory to function.
OrderByDescending()
:heavy_check_mark: Prepend() Returns a new collection.
:heavy_check_mark: Range() Semantically different from standard range() function.
:heavy_check_mark: Repeat()
Reverse() Needs all data at once.
:heavy_check_mark: Select()
:heavy_check_mark: SelectMany()
SequenceEqual()
:heavy_check_mark: Single() @throws :bomb:
SingleOrDefault()
:heavy_check_mark: Skip()
:heavy_check_mark: SkipWhile()
:heavy_check_mark: Sum()
:heavy_check_mark: Take() Returns a new collection.
:heavy_check_mark: TakeWhile() Returns a new collection.
ThenBy() Sorting needs all data at once.
ThenByDescending() Sorting needs all data at once.
:heavy_check_mark: ToArray()
ToDictionary() Not applicable.
ToList() Not applicable.
ToLookup() Not applicable.
Union() Needs to store all previously processed data.
:heavy_check_mark: Where()
:heavy_check_mark: Zip() Returns a new collection.

Only non-lazy (or eager) methods are left out as they can't have a correct lazy implementation with generators. Sure, they could be implemented as standard deferred methods, but still, they'll want all the data at once.

For all inputs, keys are not exported nor used. If you absolutely need to access keys, consider storing them with the data.

Durability

This library is built to last. Whatever you throw at it, it should just work.

There are only few methods marked with a :bomb: above that may throw an exception: .NET API requires that, so it was unavoidable. Other than that, you can expect only standard language errors to happen.


All versions of lazy-linq with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
sanmai/pipeline Version ^2 || ^3 || ^4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sanmai/lazy-linq contains the following files

Loading the files please wait ....