jlaso / alias-generator
Pseudo random alias generator
dev-master
2018-11-14 20:16 UTC
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2024-11-15 11:41:45 UTC
README
This project provides helpers to generate pseudo-random alias.
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