src/GeneratorFileDictLoader.php
protected function getGenerator(array $handles)
    {
        foreach ($handles as $handle) {
            $handle->seek(0);
            while (false === $handle->eof()) {
                $string = str_replace(['\'', ' ', PHP_EOL, ','], '', $handle->fgets());

                if (false === strpos($string, '=>')) {
                    continue;
                }

                list($string, $pinyin) = explode('=>', $string);

                yield $string => $pinyin;
            }
        }
    }
protected function getGenerator(array $handles)
    {
        foreach ($handles as $handle) {
            $handle->seek(0);
            while (false === $handle->eof()) {
                $string = str_replace(['\'', ' ', PHP_EOL, ','], '', $handle->fgets());

                if (false === strpos($string, '=>')) {
                    continue;
                }

                list($string, $pinyin) = explode('=>', $string);

                yield $string => $pinyin;
            }
        }
    }
protected function getGenerator ( array $ handles ) { foreach ( $ handles as $ handle ) { $ handle -> seek ( 0 ) ; while ( false === $ handle -> eof ( ) ) { $ string = str_replace ( [ '\'' , ' ' , PHP_EOL , ',' ] , '' , $ handle -> fgets ( ) ) ; if ( false === strpos ( $ string , '=>' ) ) { continue ; } list ( $ string , $ pinyin ) = explode ( '=>' , $ string ) ; yield $ string => $ pinyin ; } } }
get Generator syntax.

@param array $handles SplFileObjects

@return Generator
get Generator syntax .