deseretdigital / cxense-encoders
Encoders for Cxense Data
Installs: 7 015
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 24
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~5.1
- raveren/kint: ~1.0
- squizlabs/php_codesniffer: ~2.0
This package is not auto-updated.
Last update: 2022-04-26 09:06:04 UTC
README
Cxense requires custom parameters to be <= 20 characters. This library provides encoders for data that may in original form not fit into this 20 character limit. Decoders are also provided.
List of Supported Encoders
- MongoIdEncoder - Converts a 24 character Mongo ID to a 17 character string and back
Interface
All encoders make use of a common interface that provides an encode
and a decode
method.
Examples
<?php $encoder = new CxenseEncoders\MongoIdEncoder(); $encodedId = $encoder->encode('555cba723287777ccc0041b2'); $decodedId = $encoder->decode($encodedId);