praetoriantechnology / php-slugger
This package is abandoned and no longer maintained.
No replacement package was suggested.
Simple PHP Slug generator
1.0.0
2022-09-21 21:44 UTC
Requires
- php: ^8.0
- ext-iconv: *
- ext-mbstring: *
Requires (Dev)
- behat/behat: ^3.11
- friendsofphp/php-cs-fixer: ^3
- phpunit/php-code-coverage: ^9.2
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2023-06-21 23:35:29 UTC
README
Simple library for building a slugs out of strings.
Usage:
use Praetorian\Slugger\Slugger;
$slugger = new Slugger();
echo $slugger->slugify('sample$$@#%$ test ąęćźż'); //sample-test-aeczz
echo PHP_EOL;
echo $slugger->slugify('sample$$@#%$ test ąęćźż', divider: '_'); //sample_test_aeczz
Contribution
Any pull requests or issues reported are more than welcome.
License
MIT