opus-online / yii-shortify
Yii shortify hashes a string into a smaller string
This package's canonical repository appears to be gone and the package has been frozen as a result.
dev-master
2014-03-17 09:45 UTC
Requires
- php: >=5.2.0
- predis/predis: 0.8.5
This package is not auto-updated.
Last update: 2024-01-20 12:06:03 UTC
README
This component will shorten a string to a shorter string. Can also expand the shorter string back to the full string.
Requirements
- php >= 5.2
Usage
Install using composer ( https://packagist.org/packages/opus-online/yii-shortify )
Setting up for Yii v1:
At the head of protected/config/main.php add:
Yii::setPathOfAlias('OpusOnline.Shortify', dirname(FILE) . '/../vendors/opus-online/yii-shortify');
Example usage:
$redis = new Predis\Client('tcp://localhost:6379'); $redis->select(15); $shortify = new \OpusOnline\Shortify\Shortify($redis); $shorten = $shortify->shorten('route3'); var_dump($shorten); $expand = $shortify->expand($shorten); var_dump($expand);