Sequence
- Type
- Class
- Namespace
- craft\helpers
- Inherits
- craft\helpers\Sequence
- Since
- 3.0.31
Class Sequence
# Public Methods
Method | Description |
---|---|
current() | Returns the current value in a given sequence. |
next() | Returns the next number in a given sequence. |
# current()
- Since
- 3.0.32
Returns the current value in a given sequence.
Arguments
$name
(string) – The sequence name.$length
(integer, null) – The minimum string length that should be returned. (Numbers that are too short will be left-padded with0
s.)
Returns
# next()
Returns the next number in a given sequence.
Arguments
$name
(string) – The sequence name.$length
(integer, null) – The minimum string length that should be returned. (Numbers that are too short will be left-padded with0
s.)
Returns
Throws
- yii\db\Exception
if a lock could not be acquired for the sequence - Throwable
if reasons
← Search StringHelper →