PHP 클래스 Overtrue\Pinyin\GeneratorFileDictLoader

상속: implements Overtrue\Pinyin\DictLoaderInterface
파일 보기 프로젝트 열기: overtrue/pinyin

보호된 프로퍼티들

프로퍼티 타입 설명
$handles array SplFileObjects.
$path string Data directory.
$segmentName string Words segment name.

공개 메소드들

메소드 설명
__construct ( string $path ) Constructor.
map ( Closure $callback ) Load dict.
mapSurname ( Closure $callback ) Load surname dict.

보호된 메소드들

메소드 설명
getGenerator ( array $handles ) get Generator syntax.
openFile ( string $filename, $mode = 'r' ) : SplFileObject Construct a new file object.

메소드 상세

__construct() 공개 메소드

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

getGenerator() 보호된 메소드

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

map() 공개 메소드

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

mapSurname() 공개 메소드

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

openFile() 보호된 메소드

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

프로퍼티 상세

$handles 보호되어 있는 프로퍼티

SplFileObjects.
protected array $handles
리턴 array

$path 보호되어 있는 프로퍼티

Data directory.
protected string $path
리턴 string

$segmentName 보호되어 있는 프로퍼티

Words segment name.
protected string $segmentName
리턴 string