PHP Class Overtrue\Pinyin\GeneratorFileDictLoader

Inheritance: implements Overtrue\Pinyin\DictLoaderInterface
Afficher le fichier Open project: overtrue/pinyin

Protected Properties

Свойство Type Description
$handles array SplFileObjects.
$path string Data directory.
$segmentName string Words segment name.

Méthodes publiques

Méthode Description
__construct ( string $path ) Constructor.
map ( Closure $callback ) Load dict.
mapSurname ( Closure $callback ) Load surname dict.

Méthodes protégées

Méthode Description
getGenerator ( array $handles ) get Generator syntax.
openFile ( string $filename, $mode = 'r' ) : SplFileObject Construct a new file object.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $path )
$path string

getGenerator() protected méthode

get Generator syntax.
protected getGenerator ( array $handles )
$handles array SplFileObjects

map() public méthode

Load dict.
public map ( Closure $callback )
$callback Closure

mapSurname() public méthode

Load surname dict.
public mapSurname ( Closure $callback )
$callback Closure

openFile() protected méthode

Construct a new file object.
protected openFile ( string $filename, $mode = 'r' ) : SplFileObject
$filename string file path
Résultat SplFileObject

Property Details

$handles protected_oe property

SplFileObjects.
protected array $handles
Résultat array

$path protected_oe property

Data directory.
protected string $path
Résultat string

$segmentName protected_oe property

Words segment name.
protected string $segmentName
Résultat string