public function next()
    {

        $this->index++;

        if ($this->className) {
            $this->value = $this->query->getObject($this->className);
        } else {
            $this->value = $this->query->getRow();
        }

        return $this;
    }