@@ -123,46 +123,33 @@ public function getComponentArrayContent(): string
123123 ' . $ this ->name ->renderClassComment () . '
124124
125125use Neos\Flow\Annotations as Flow;
126- use PackageFactory\AtomicFusion\PresentationObjects\Domain\Component\AbstractComponentArray;
127126
128127/**
129128 * @Flow\Proxy(false)
130129 */
131- final class ' . $ this ->name ->getSimpleComponentArrayName () . ' extends AbstractComponentArray
130+ final class ' . $ this ->name ->getSimpleComponentArrayName () . ' implements \IteratorAggregate
132131{
132+ /**
133+ * @var array<int, ' . $ this ->name ->getSimpleInterfaceName () . '>| ' . $ this ->name ->getSimpleInterfaceName () . '[]
134+ */
135+ private array $ ' . $ this ->name ->getSimpleComponentArrayPropertyName () . ';
136+
133137 public function __construct($array)
134138 {
135139 foreach ($array as $element) {
136140 if (!$element instanceof ' . $ this ->name ->getSimpleInterfaceName () . ') {
137141 throw new \InvalidArgumentException(self::class . \' can only consist of \' . ' . $ this ->name ->getSimpleInterfaceName () . '::class);
138142 }
139143 }
140- parent::__construct($array);
141- }
142-
143- /**
144- * @param mixed $key
145- * @return ' . $ this ->name ->getSimpleInterfaceName () . '|false
146- */
147- public function offsetGet($key)
148- {
149- return parent::offsetGet($key);
150- }
151-
152- /**
153- * @return array| ' . $ this ->name ->getSimpleInterfaceName () . '[]
154- */
155- public function getArrayCopy(): array
156- {
157- return parent::getArrayCopy();
144+ $this-> ' . $ this ->name ->getSimpleComponentArrayPropertyName () . ' = $array;
158145 }
159146
160147 /**
161- * @return \ArrayIterator| ' . $ this ->name ->getSimpleInterfaceName () . '[]
148+ * @return \ArrayIterator<int, ' . $ this -> name -> getSimpleInterfaceName () . ' > | ' . $ this ->name ->getSimpleInterfaceName () . '[]
162149 */
163150 public function getIterator(): \ArrayIterator
164151 {
165- return parent::getIterator( );
152+ return new \ArrayIterator($this-> ' . $ this -> name -> getSimpleComponentArrayPropertyName () . ' );
166153 }
167154}
168155 ' ;
0 commit comments