public function getIterator(): \Generator
    {
        $line = '';
        foreach ($this->readIterator as $content) {
            $parts = explode($this->delimiter, $content);
            $partCount = \count($parts);
            if ($partCount > 1) {
                foreach ($parts as $i => $part) {
                    if ($i === 0) {
                        yield $line.$part;
                        continue;
                    }

                    if ($i === $partCount - 1) {
                        $line = $part;
                        continue;
                    }
                    yield $part;
                }
                continue;
            }
            $line .= $content;
        }
        yield $line;
    }
public function getIterator(): \Generator
    {
        $line = '';
        foreach ($this->readIterator as $content) {
            $parts = explode($this->delimiter, $content);
            $partCount = \count($parts);
            if ($partCount > 1) {
                foreach ($parts as $i => $part) {
                    if ($i === 0) {
                        yield $line.$part;
                        continue;
                    }

                    if ($i === $partCount - 1) {
                        $line = $part;
                        continue;
                    }
                    yield $part;
                }
                continue;
            }
            $line .= $content;
        }
        yield $line;
    }
public function getIterator ( ) : \ Generator { $ line = '' ; foreach ( $ this -> readIterator as $ content ) { $ parts = explode ( $ this -> delimiter , $ content ) ; $ partCount = \ count ( $ parts ) ; if ( $ partCount > 1 ) { foreach ( $ parts as $ i => $ part ) { if ( $ i === 0 ) { yield $ line . $ part ; continue ; } if ( $ i === $ partCount - 1 ) { $ line = $ part ; continue ; } yield $ part ; } continue ; } $ line .= $ content ; } yield $ line ; }
Generates parts of an iterator split by the specified delimiter.

@return \Generator|string[]
Generates parts of an iterator split by the specified delimiter .