Skip to content

errant/sequential

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

Sequential

Sequential lets you create sequences of ID numbers, optionally formatted.

## Install

With composer:

require "errant/sequential": "1.0.*"

Examples

$sequencer = new \Sequential\Sequence('tcp://10.0.0.1:6379');
$sequencer->reset('test_sequence');
echo $sequencer->getNextID('test_sequence');

You can also format IDs:

function padFormat($sequence) {
    return str_pad($sequence, 5, '0', STR_PAD_LEFT);
}
echo $sequencer->getNextIDFormatted('test_sequence', padFormat);

About

Simple Sequential ID generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages