function() { if ( $this->file ){ $f = fopen($this->file, 'r'); try { while ($line = fgets($f)) { yield $line; } } finally { fclose($f); } } }