public function next()
    {
        if ($this->isEndReached) {
            return null;
        }
        if (null === $this->previous) {
            $this->previous = @ldap_first_entry($this->connection, $this->resultSet);
        } else {
            $this->previous = @ldap_next_entry($this->connection, $this->previous);
        }
        if (false === $this->previous) {
            $this->previous = null;
            $this->isEndReached = true;
            return null;
        }
        return new Entry($this->connection, $this->previous);
    }