PHPackages                             prhost/packer - 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. prhost/packer

ActiveLibrary

prhost/packer
=============

Library to organize and package your products intelligently

3802PHP

Since Jun 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/prhost/packer)[ Packagist](https://packagist.org/packages/prhost/packer)[ RSS](/packages/prhost-packer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PACKER (BETA)
=============

[](#packer-beta)

Library to organize and package your products intelligently

[![Packer](packer.jpg)](packer.jpg)

Example
-------

[](#example)

```
require_once '../vendor/autoload.php';

use Prhost\Packer\Classes\ConveyorBelt;
use Prhost\Packer\Classes\Package;
use Prhost\Packer\Classes\Worker;
use Prhost\Packer\Classes\Product;

//creating packages
$package1 = new Package();
$package1
    ->setIdentifier('package1')
    ->setWidth(20)
    ->setHeight(20)
    ->setLength(30)
    ->setWeight(1)
    ->setMaxWeight(30);  //no define to disable check max weight
$package2 = new Package();

$package2
    ->setIdentifier('package2')
    ->setWidth(20)
    ->setHeight(20)
    ->setLength(20)
    ->setWeight(1);

//create product
$product1 = new Product();
$product1
    ->setIdentifier('product1')
    ->setQuantity(1)
    ->setWeight(20)
    ->setLength(10)
    ->setWidth(30)
    ->setHeight(10)
    ->enableEitherSideIsUp();
$product2 = new Product();

$product2
    ->setIdentifier('product2')
    ->setQuantity(13)
    ->setWeight(10)
    ->setLength(10)
    ->setWidth(30)
    ->setHeight(10);

//on conveyorbelt
$conveyorBelt = new ConveyorBelt();
$conveyorBelt
    ->put($product1)
    ->put($product2);

$worker = new Worker();
$worker
    ->setConveyorBelt($conveyorBelt)
    ->setPackages([
        $package1,
        $package2,
    ]);

$volumes = $worker->arrange();

echo "Total volumes: " . count($volumes) . '';
foreach ($volumes as $volume) {
    var_dump($volume);
    echo "==========================================================";
}

//Left over products on the conveyorbelt
echo "Left over products on the conveyorbelt: " . $worker->getConveyorBelt()->count() . '';
foreach ($worker->getConveyorBelt()->getProducts() as $product) {
    var_dump($product);
    echo "==========================================================";
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3984760?v=4)[Kallef Alexandre](/maintainers/prhost)[@prhost](https://github.com/prhost)

---

Top Contributors

[![prhost](https://avatars.githubusercontent.com/u/3984760?v=4)](https://github.com/prhost "prhost (1 commits)")

---

Tags

composer-librarypackagepackerphpphp7

### Embed Badge

![Health badge](/badges/prhost-packer/health.svg)

```
[![Health](https://phpackages.com/badges/prhost-packer/health.svg)](https://phpackages.com/packages/prhost-packer)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
