PHPackages                             jomisacu/ranking-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jomisacu/ranking-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jomisacu/ranking-generator
==========================

A tool to rank items by well known criterias

00PHP

Since Mar 2Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

ranking-generator
=================

[](#ranking-generator)

A simple way to create rankings

What is a ranking?
------------------

[](#what-is-a-ranking)

A ranking is a list that determines which items are higher and lower than others in a given aspect. For example, you can have a set of video camera models and list them based on the quality of the video produced.

It's not just about listing by number. There are general classifications based on multiple aspects, for example, we could have a classification called "the 10 best smartphones of 2022", where the place in the ranking would be given by the combination of multiple factors.

Installation
------------

[](#installation)

The most simple way to install this package is with composer:

```
composer require jomisacu/ranking-generator
```

How to use this library?
------------------------

[](#how-to-use-this-library)

There are two ways to use this library. First, we can convert our objects into "rankable". That is, implements the RankableItemInterface interface. These objects can be used to create an instance of the Ranking class and that's it.

To help in the implementation we have added the RankableItemTrait. Let's see an example:

```
