line = 0; $this->strings = explode("\n",$string); $this->total = count($this->strings); } public function getNextLine() { if (isset($this->strings[$this->line])) { $result = $this->strings[$this->line]; $this->line++; } else { $result = false; } return $result; } public function ended() { return ($this->line>=$this->total); } public function close() { $this->line = 0; } public function save($ignore) { } }