public function __construct(Index $index, $query, $params = null, $cursor = null) { $this->index = $index; $this->query = $query; $this->params = $params; $this->position = 0; $this->doQuery($cursor); }