Download the PHP package perryflynn/perrys-lambda without Composer
On this page you can find all versions of the php package perryflynn/perrys-lambda. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download perryflynn/perrys-lambda
More information about perryflynn/perrys-lambda
Files in perryflynn/perrys-lambda
Download perryflynn/perrys-lambda
More information about perryflynn/perrys-lambda
Files in perryflynn/perrys-lambda
Vendor perryflynn
Package perrys-lambda
Short Description Implementation of lambda expressions for PHP.
License MIT
Homepage https://github.com/perryflynn/PerrysLambda
Package perrys-lambda
Short Description Implementation of lambda expressions for PHP.
License MIT
Homepage https://github.com/perryflynn/PerrysLambda
Please rate this library. Is it a good library?
Informations about the package perrys-lambda
This project tries to implement C# .NET lambda expressions in PHP.
Status
In development, semi-stable API.
Composer
Features
- Implements many C# .NET like lambda expressions
- Support for auto conversion of records in custom objects
- Support for iteation and foreach
- Support for generator (helps with call-by-reference in loops)
- Helper classes for filesystem access
- Helper classes for CSV file parsing
Lambda methods
Method | Description |
---|---|
*OrDefault | Define return value if expression has no hit, available for many methods |
first |
Get the first record |
last |
Get the last record |
single |
Get the single record, if count!=0 , throw exception |
take |
Get the first X records |
skip |
Skip the first X records |
where |
Filter records by callable expression |
whereFirst |
Get first record matching the callable expression |
groupby |
Group records by callable expression |
distrinct |
Eliminate duplicate records bei callable expression |
intersect |
Returns the intersection of two ArrayList's |
except |
Returns the bidirectional diffrence of two ArrayList's |
any |
Returns true if callable expression returns at least one record true |
all |
Returns true if callable expression returns for all records true |
select |
Get an array of the values returned by callable expression |
selectMany |
Get an array of all values, arrays will be merged |
joinString |
Join a string from values returned by callable expression |
each |
Execute callable expression on each record |
sum |
Get the sum of numberic return values from callable expression |
min |
Get the smallest of numberic return values from callable expression |
max |
Get the biggest of numberic return values from callable expression |
avg |
Get the average of numberic return values from callable expression |
order |
Start sorting, begin ascending, more possible by thenBy / thenByDesc |
orderDesc |
Start sorting, begin descending, more possible by thenBy / thenByDesc |
Basic usage
Basic usage with ObjectArray and Strings instead of callables
Deserialize / Serialize
- Deserialize json data
- Modify data
- Serialize again into json data
- Display modified json data
More examples
See the unit tests
All versions of perrys-lambda with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.0
The package perryflynn/perrys-lambda contains the following files
Loading the files please wait ....