jlaso/alias-generator

Pseudo random alias generator

dev-master 2018-11-14 20:16 UTC

This package is auto-updated.

Last update: 2024-10-15 11:29:16 UTC


README

This project provides helpers to generate pseudo-random alias.

SensioLabsInsight

Build Status

Installation

Add AliasBundle to your vendor/bundles/ dir

::

$ git submodule add git://github.com/jlaso/AliasGenerator.git app/models/alias

or use composer

composer require jlaso/alias-generator

Usage

For example generating alias for an url based on id

    $generator = new AliasGenerator();
    $alias     = $generator->encode($id);

And for decode

    $generator = new AliasGenerator();
    $id        = $generator->decode($alias);

Start docker container to test

    docker-compose up --build

once started log in into the container

    docker-compose exec php /bin/bash

and run the tests

    phpunit