No description
Find a file
2017-09-04 15:31:12 +02:00
Classes/DigiComp/Sequence TASK: Adding functional test guarantee basic functionality, small refactoring of SequnceGenerator 2016-06-24 20:35:59 +02:00
Configuration/Testing TASK: Adding functional test guarantee basic functionality, small refactoring of SequnceGenerator 2016-06-24 20:35:59 +02:00
Migrations/Mysql TASK: Adding missing index migration 2016-06-24 20:40:25 +02:00
Tests/Functional TASK: Adding functional test guarantee basic functionality, small refactoring of SequnceGenerator 2016-06-24 20:35:59 +02:00
.gitignore Initial commit 2014-04-07 15:25:16 +02:00
composer.json TASK: Fixing branch alias 2017-09-04 15:31:12 +02:00
License.txt TASK: Preparing first public release 2016-06-24 20:57:06 +02:00
README.md TASK: Moving Readme.md to README.md 2016-06-24 20:59:47 +02:00

DigiComp.Sequence

This is a very simple and stupid tool, helping in generation of gapless sequences. For this task it relies on key integrity of the database of your choice.

Usage is quite simple also:

/**
 * @param \DigiComp\Sequence\Service\SequenceNumberGenerator $sequenceNumberGenerator
 */
public function __construct(SequenceNumberGenerator $sequenceNumberGenerator) 
{
	$this->orderId = $sequenceNumberGenerator->getNextNumberFor($this);		
}

getNextNumberFor allows you to give an object which will be resolved to its FQCN or a custom sequence name.

The CommandController helps you to advance the current sequence number, in case of migrations or similar.

See ./flow help sequence:advance if interested.