public function __construct(NodeConnectionInterface $connection, $size) { $this->connection = $connection; $this->size = $size; $this->position = 0; $this->current = $size > 0 ? $this->getValue() : null; }