@@ -83,127 +83,127 @@ See the [demo.php](demo.php) file for a working example.
8383The following is an incomplete list, containing only the most common methods.
8484For a complete documentation of all classes, read the generated [ PHPDoc] ( doc ) .
8585
86- ### public __ construct($language = 'en', string|Hyphen $hyphen = null)
86+ #### public __ construct($language = 'en', string|Hyphen $hyphen = null)
8787
8888Create a new Syllable class, with defaults.
8989
90- ### public static setCacheDir(string $dir)
90+ #### public static setCacheDir(string $dir)
9191
9292Set the directory where compiled language files may be stored.
9393Default to the ` cache ` subdirectory of the current directory.
9494
95- ### public static setEncoding(string|null $encoding = null)
95+ #### public static setEncoding(string|null $encoding = null)
9696
9797Set the character encoding to use.
9898Specify ` null ` encoding to not apply any encoding at all.
9999
100- ### public static setLanguageDir(string $dir)
100+ #### public static setLanguageDir(string $dir)
101101
102102Set the directory where language source files can be found.
103103Default to the ` languages ` subdirectory of the current directory.
104104
105- ### public setLanguage(string $language)
105+ #### public setLanguage(string $language)
106106
107107Set the language whose rules will be used for hyphenation.
108108
109- ### public setHyphen(mixed $hyphen)
109+ #### public setHyphen(mixed $hyphen)
110110
111111Set the hyphen text or object to use as a hyphen marker.
112112
113- ### public getHyphen(): Hyphen
113+ #### public getHyphen(): Hyphen
114114
115115Get the current hyphen object.
116116
117- ### public setCache(Cache $cache = null)
117+ #### public setCache(Cache $cache = null)
118118
119- ### public getCache(): Cache
119+ #### public getCache(): Cache
120120
121- ### public setSource($source)
121+ #### public setSource($source)
122122
123- ### public getSource(): Source
123+ #### public getSource(): Source
124124
125- ### public setMinWordLength(int $length = 0)
125+ #### public setMinWordLength(int $length = 0)
126126
127127Words need to contain at least this many character to be hyphenated.
128128
129- ### public getMinWordLength(): int
129+ #### public getMinWordLength(): int
130130
131- ### public setLibxmlOptions(int $libxmlOptions)
131+ #### public setLibxmlOptions(int $libxmlOptions)
132132
133133Options to use for HTML parsing by libxml.
134134See https://www.php.net/manual/de/libxml.constants.php .
135135
136- ### public excludeAll()
136+ #### public excludeAll()
137137
138138Exclude all elements.
139139
140- ### public excludeElement(string|string[ ] $elements)
140+ #### public excludeElement(string|string[ ] $elements)
141141
142142Add one or more elements to exclude from HTML.
143143
144- ### public excludeAttribute(string|string[ ] $attributes, $value = null)
144+ #### public excludeAttribute(string|string[ ] $attributes, $value = null)
145145
146146Add one or more elements with attributes to exclude from HTML.
147147
148- ### public excludeXpath(string|string[ ] $queries)
148+ #### public excludeXpath(string|string[ ] $queries)
149149
150150Add one or more xpath queries to exclude from HTML.
151151
152- ### public includeElement(string|string[ ] $elements)
152+ #### public includeElement(string|string[ ] $elements)
153153
154154Add one or more elements to include from HTML.
155155
156- ### public includeAttribute(string|string[ ] $attributes, $value = null)
156+ #### public includeAttribute(string|string[ ] $attributes, $value = null)
157157
158158Add one or more elements with attributes to include from HTML.
159159
160- ### public includeXpath(string|string[ ] $queries)
160+ #### public includeXpath(string|string[ ] $queries)
161161
162162Add one or more xpath queries to include from HTML.
163163
164- ### public splitWord(string $word): array
164+ #### public splitWord(string $word): array
165165
166166Split a single word on where the hyphenation would go.
167167Punctuation is not supported, only simple words. For parsing whole sentences
168168please use Syllable::splitWords() or Syllable::splitText().
169169
170- ### public splitWords(string $text): array
170+ #### public splitWords(string $text): array
171171
172172Split a text into an array of punctuation marks and words,
173173splitting each word on where the hyphenation would go.
174174
175- ### public splitText(string $text): array
175+ #### public splitText(string $text): array
176176
177177Split a text on where the hyphenation would go.
178178
179- ### public hyphenateWord(string $word): string
179+ #### public hyphenateWord(string $word): string
180180
181181Hyphenate a single word.
182182
183- ### public hyphenateText(string $text): string
183+ #### public hyphenateText(string $text): string
184184
185185Hyphenate all words in the plain text.
186186
187- ### public hyphenateHtml(string $html): string
187+ #### public hyphenateHtml(string $html): string
188188
189189Hyphenate all readable text in the HTML, excluding HTML tags and
190190attributes.
191191
192- ### public histogramText(string $text): array
192+ #### public histogramText(string $text): array
193193
194194Count the number of syllables in the text and return a map with
195195syllable count as key and number of words for that syllable count as
196196the value.
197197
198- ### public countWordsText(string $text): int
198+ #### public countWordsText(string $text): int
199199
200200Count the number of words in the text.
201201
202- ### public countSyllablesText(string $text): int
202+ #### public countSyllablesText(string $text): int
203203
204204Count the number of syllables in the text.
205205
206- ### public countPolysyllablesText(string $text): int
206+ #### public countPolysyllablesText(string $text): int
207207
208208Count the number of polysyllables in the text.
209209
0 commit comments