PHP 클래스 Sastrawi\Dictionary\ArrayDictionary

상속: implements Sastrawi\Dictionary\DictionaryInterface
파일 보기 프로젝트 열기: sastrawi/sastrawi 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$words string[]

공개 메소드들

메소드 설명
__construct ( array $words = [] )
add ( string $word ) : void Add a word to the dictionary
addWords ( array $words ) : void Add multiple words to the dictionary
addWordsFromTextFile ( $filePath, $delimiter = " " ) : void Add words from a text file to the dictionary
contains ( $word )
count ( )
remove ( string $word ) : void Remove a word from the dictionary

메소드 상세

__construct() 공개 메소드

public __construct ( array $words = [] )
$words array

add() 공개 메소드

Add a word to the dictionary
public add ( string $word ) : void
$word string
리턴 void

addWords() 공개 메소드

Add multiple words to the dictionary
public addWords ( array $words ) : void
$words array
리턴 void

addWordsFromTextFile() 공개 메소드

Add words from a text file to the dictionary
public addWordsFromTextFile ( $filePath, $delimiter = " " ) : void
리턴 void

contains() 공개 메소드

public contains ( $word )

count() 공개 메소드

public count ( )

remove() 공개 메소드

Remove a word from the dictionary
public remove ( string $word ) : void
$word string
리턴 void

프로퍼티 상세

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

protected string[] $words
리턴 string[]