optimized README.md
This commit is contained in:
parent
d5f8b671d5
commit
83839a1582
1 changed files with 15 additions and 17 deletions
28
README.md
28
README.md
|
@ -1,22 +1,20 @@
|
||||||
DigiComp.Sequence
|
# DigiComp.Sequence
|
||||||
-------------------------
|
|
||||||
|
|
||||||
|
This is a very simple tool, helping in generation of gapless sequences. For this task it relies on key integrity of the
|
||||||
This is a very simple and stupid tool, helping in generation of gapless sequences. For this task it relies on key
|
database of your choice.
|
||||||
integrity of the database of your choice.
|
|
||||||
|
|
||||||
Usage is quite simple also:
|
Usage is quite simple also:
|
||||||
|
```php
|
||||||
/**
|
/**
|
||||||
* @param \DigiComp\Sequence\Service\SequenceNumberGenerator $sequenceNumberGenerator
|
* @param SequenceNumberGenerator $sequenceNumberGenerator
|
||||||
*/
|
*/
|
||||||
public function __construct(SequenceNumberGenerator $sequenceNumberGenerator)
|
public function __construct(SequenceNumberGenerator $sequenceNumberGenerator)
|
||||||
{
|
{
|
||||||
$this->orderId = $sequenceNumberGenerator->getNextNumberFor($this);
|
$this->orderId = $sequenceNumberGenerator->getNextNumberFor($this);
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
``getNextNumberFor`` allows you to give an object which will be resolved to its FQCN or a custom sequence name.
|
`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.
|
The `SequenceCommandController` helps you to advance the current sequence number, in case of migrations or similar. See
|
||||||
|
`./flow help sequence:advance` if interested.
|
||||||
See ``./flow help sequence:advance`` if interested.
|
|
||||||
|
|
Loading…
Reference in a new issue