Doctrine\ORM\Id\SequenceGenerator
Represents an ID generator that uses a database sequence.
- Author: Roman Borschel <roman@code-factory.org>
Synopsis
class SequenceGenerator
extends AbstractIdGenerator
implements
Serializable
{
- // members
- private $_allocationSize;
- private $_sequenceName;
- private integer $_nextValue;
- private $_maxValue;
- // methods
- public void __construct()
- public integer|float generate()
- public integer|float getCurrentMaxValue()
- public integer|float getNextValue()
- public void serialize()
- public void unserialize()
- // Inherited methods from AbstractIdGenerator
- public abstract mixed generate()
- public boolean isPostInsertGenerator()
Hierarchy
Members
private
- $_allocationSize
- $_maxValue
- $_nextValue
- $_sequenceName
Methods
public
- __construct() — Initializes a new sequence generator.
- generate() — Generates an ID for the given entity.
- getCurrentMaxValue() — Gets the maximum value of the currently allocated bag of values.
- getNextValue() — Gets the next value that will be returned by generate().
- serialize()
- unserialize()
Inherited from Doctrine\ORM\Id\AbstractIdGenerator
public
- generate() — Generates an identifier for an entity.
- isPostInsertGenerator() — Gets whether this generator is a post-insert generator which means that {@link generate()} must be called after the entity has been inserted into the database.