kellerkinder/fancy-sorter

Fancy Sorter is a small library that offers several sorters for specific use classes often known and seen in ecommerce projects that offer clothing products.

Package info

github.com/kellerkinderDE/fancy-sorter

pkg:composer/kellerkinder/fancy-sorter

Statistics

Installs: 2 164

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

0.2.1 2015-06-10 11:30 UTC

Requires

  • php: >=5.5.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

proprietary 4e0ee47a0145c2396543425442d8ad09d6c573a0

  • Stefan Matheis <stefan.woop@kellerkinder.de>

This package is auto-updated.

Last update: 2026-06-28 09:47:03 UTC


README

Fancy Sorter is a small library that offers several sorters for specific use classes often known and seen in ecommerce projects that offer clothing products.

That is, sorting sizes like:

  • jeans (32/30, 34W/30L, …)
  • clothing (XS, S, M, L, XL, XXL, 3XL, …)
  • numeric (32, 34, 36, 50, 52, 96, 128, …)

As well as the possibilty to chained needed sorters together, so the best fit is automatically used.

Installing Fancy Sorter

The recommended way to install Fancy Sorter is through Composer:

composer require kellerkinder/fancy-sorter

Using Fancy Sorter

$sorter = new JeansSizeSorter();
$result = $sorter->sort(['30/32', '32 / 34', '32/ 30', '30W/30L', '32W / 32L']);
// => ['30W/30L', '30/32', '32/ 30', '32W / 32L', '32 / 34']