AliasGenerator
This project provides helpers to generate pseudo-random alias., (*1)
, (*2)
, (*3)
Installation
Add AliasBundle to your vendor/bundles/ dir
::, (*4)
$ git submodule add git://github.com/jlaso/AliasGenerator.git app/models/alias
or use composer, (*5)
composer require jlaso/alias-generator
Usage
For example generating alias for an url based on id, (*6)
$generator = new AliasGenerator();
$alias = $generator->encode($id);
And for decode, (*7)
$generator = new AliasGenerator();
$id = $generator->decode($alias);
Start docker container to test
docker-compose up --build
once started log in into the container, (*8)
docker-compose exec php /bin/bash
and run the tests, (*9)
phpunit