Skip to content

Sequence ​

Type
Class
Namespace
craft\helpers
Inherits
craft\helpers\Sequence
Since
3.0.31

Class Sequence

View source

Public Methods ​

MethodDescription
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.

View source

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 with 0s.)

Returns ​

integer, string

next() ​

Returns the next number in a given sequence.

View source

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 with 0s.)

Returns ​

integer, string

Throws ​