Download the PHP package cayetanosoriano/hashids-bundle without Composer
On this page you can find all versions of the php package cayetanosoriano/hashids-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cayetanosoriano/hashids-bundle
More information about cayetanosoriano/hashids-bundle
Files in cayetanosoriano/hashids-bundle
Package hashids-bundle
Short Description Bundle for integration of hashids lib to the container
License MIT
Informations about the package hashids-bundle
hashidsBundle
This is a bundle to use http://www.hashids.org/ as a service
Installation
Symfony 2.1.x <= 2.4.x: Composer
Composer is a project dependency manager for PHP. You have to list
your dependencies in a composer.json
file:
To actually install in your project, download the composer binary and run it:
Step 2: Enable the bundle
Finally, enable the bundle in the kernel:
Configuration
Add the following to your config.yml
Then use the service
Optional features
Doctrine param converter
The included Doctrine param converter extends the one included in (SensioFrameworkExtraBundle)[http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html] to automate decoding of Hashids in routes before fetching the object.
Overload the default service to your services.yml
Specify the Hashid in your route
The following two examples are equivalent, using either the raw database id
or
the Hashid encoded version.
Raw id
(standard SensioFrameworkExtraBundle behaviour)
Hashid
The hashid
request parameter will be automatically recognised as an encoded
version of id
.
license
=======