| 1 | <?php |
||
| 7 | abstract class AbstractList extends AbstractPart implements Iterator |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var array $list List of item into the list |
||
| 11 | */ |
||
| 12 | protected $list = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var integer $position Iterator cursor position |
||
| 16 | */ |
||
| 17 | protected $position = 0; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string $separator The separator to use between items during |
||
| 21 | * the call to generate() |
||
| 22 | */ |
||
| 23 | protected $separator = ''; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Getter accessor to property list |
||
| 27 | * |
||
| 28 | * @return array |
||
| 29 | */ |
||
| 30 | public function getList(): array |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Getter accessor to property position |
||
| 37 | * |
||
| 38 | * @return integer |
||
| 39 | */ |
||
| 40 | public function getPosition(): int |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Getter accessor to property separator |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public function getSeparator(): string |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Setter accessor to property partPrefix |
||
| 57 | * |
||
| 58 | * @param string $prefix |
||
| 59 | * |
||
| 60 | * @return $this |
||
| 61 | */ |
||
| 62 | public function setPartPrefix(string $prefix): self |
||
| 67 | |||
| 68 | /** |
||
| 69 | * {@inheritdoc} |
||
| 70 | */ |
||
| 71 | public function current() |
||
| 75 | |||
| 76 | /** |
||
| 77 | * {@inheritdoc} |
||
| 78 | */ |
||
| 79 | public function key(): int |
||
| 83 | |||
| 84 | /** |
||
| 85 | * {@inheritdoc} |
||
| 86 | */ |
||
| 87 | public function next() |
||
| 91 | |||
| 92 | /** |
||
| 93 | * {@inheritdoc} |
||
| 94 | */ |
||
| 95 | public function rewind() |
||
| 99 | |||
| 100 | /** |
||
| 101 | * {@inheritdoc} |
||
| 102 | */ |
||
| 103 | public function valid(): bool |
||
| 107 | |||
| 108 | /** |
||
| 109 | * {@inheritdoc} |
||
| 110 | */ |
||
| 111 | public function generate(): string |
||
| 125 | } |
||
| 126 |