novactive/collection

++ Collection ++ Abstaction library for PHP.

v3.1.0 2021-03-08 21:12 UTC

This package is auto-updated.

Last update: 2024-10-09 05:23:44 UTC


README

Nova Collection

Because we did not find any Collection for PHP as simple as we wanted, we did ours.

Simpler, Better, Faster, Stronger

Using array_* functions against foreach is not an easy pick. As this library is made to manage low level actions. We wanted it to be fast, then we compared and we implemented the best choices. (have a look: PHP7.2)

Fully unit tested it is reliable.

Methods

Advanced Selection by range

$collection = NovaCollection([0,1,2,3,4,5,6,7,8,9,10]);
$collection([2,4], 1, 2, '4-2', '3,2;5-2;10')->toArray();

Result: [2,3,4,1,2,4,3,2,3,4,5,4,3,2,10]

Standard Manipulation Methods

Contributing

In order to be accepted, your contribution needs to pass a few controls:

  • PHP files should be valid
  • PHP files should follow the PSR-2 standard
  • PHP files should be phpmd and phpcpd warning/error free

To ease the validation process, you can use these 2 scripts:

Coding Standards and syntax

make codeclean

will check and fix the Coding Standards

Tests

make tests

will run the tests

Changelog

Changelog

LICENSE

License