PHPackages                             cidram/aggregator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. cidram/aggregator

ActiveLibrary[HTTP &amp; Networking](/categories/http)

cidram/aggregator
=================

A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.

v1.3.6(1mo ago)2624.1k↓45.9%7GPL-2.0-or-laterPHPPHP &gt;=5.4.0CI passing

Since Sep 21Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/CIDRAM/Aggregator)[ Packagist](https://packagist.org/packages/cidram/aggregator)[ Docs](https://cidram.github.io/)[ Fund](https://paypal.me/maikuolan)[ Fund](https://ko-fi.com/maikuolan)[ RSS](/packages/cidram-aggregator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (12)Used By (0)

[![PHP >= 5.4.0](https://camo.githubusercontent.com/8fbebc4a6c44e51bc9bdd549e1d9faf62105817a67276caaba992e8acbd096c3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344253230352e342e302d3838393262662e737667)](https://camo.githubusercontent.com/8fbebc4a6c44e51bc9bdd549e1d9faf62105817a67276caaba992e8acbd096c3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344253230352e342e302d3838393262662e737667)[![License: GPL v2](https://camo.githubusercontent.com/77e900ae34f8da9ccccc42662fce61a94ab07ddbfe3f7d066178e824f3673dbd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c25323076322d626c75652e737667)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)[![PRs Welcome](https://camo.githubusercontent.com/b6fe512cad13e5de9ccd5eae66f2524a55c4dee64d69ed8697b72c5c4b2a19dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d57656c636f6d652d627269676874677265656e2e737667)](http://makeapullrequest.com)

Aggregator.
-----------

[](#aggregator)

A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.

---

### How to install:

[](#how-to-install)

Installing the Aggregator is exceptionally easy. You can download the necessary files directly from the `src` directory, and then copy them to any projects that need it, or, if you'd prefer, you can install it using Composer:

`composer require cidram/aggregator`

*Note: The code in this class is based upon code in the CIDRAM package, but the two are NOT dependent on each other.*

After you've downloaded the file, to allow your projects to use the class, [PSR-4](https://www.php-fig.org/psr/psr-4/) autoloading is preferred (particularly if you're using a large number of different, unrelated classes). If you're installing the class via Composer, all you have to do is `require_once 'vendor/autoload.php';` and everything will be taken care of. Alternatively, if you're installing it manually (or without Composer), and don't want to use a PSR-4 autoloader, you can simply require or include the class into your projects (which may be much easier in many cases) by including the respective statement to point to the class file in the relevant PHP files.

---

### How to use:

[](#how-to-use)

The simplest way to use Aggregator is to create a new instance of the class and enter some data to be aggregated as a parameter to the aggregate method. The aggregate method will return an aggregate of the entered data.

Example:

```
