Skip to content

Commit 6eeb0ca

Browse files
committed
Update options method names
Undo Prettier markdown formatting
1 parent 4e01a43 commit 6eeb0ca

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -150,51 +150,51 @@ $dom->loadFromUrl('http://gmail.com'); // will not have whitespaceTextNode set t
150150

151151
At the moment we support 12 options.
152152

153-
**Strict**
153+
**setStrict**
154154

155-
Strict, by default false, will throw a `StrickException` if it find that the html is not strictly compliant (all tags must have a closing tag, no attribute with out a value, etc.).
155+
`setStrict`, by default `false`, will throw a `StrickException` if it find that the html is not strictly compliant (all tags must have a closing tag, no attribute with out a value, etc.).
156156

157-
**whitespaceTextNode**
157+
**setWhitespaceTextNode**
158158

159-
The whitespaceTextNode, by default true, option tells the parser to save textnodes even if the content of the node is empty (only whitespace). Setting it to false will ignore all whitespace only text node found in the document.
159+
The `setWhitespaceTextNode`, by default `true`, option tells the parser to save textnodes even if the content of the node is empty (only whitespace). Setting it to `false` will ignore all whitespace only text node found in the document.
160160

161-
**enforceEncoding**
161+
**setEnforceEncoding**
162162

163-
The enforceEncoding, by default null, option will enforce an character set to be used for reading the content and returning the content in that encoding. Setting it to null will trigger an attempt to figure out the encoding from within the content of the string given instead.
163+
The `setEnforceEncoding`, by default `null`, option will enforce an character set to be used for reading the content and returning the content in that encoding. Setting it to `null` will trigger an attempt to figure out the encoding from within the content of the string given instead.
164164

165-
**cleanupInput**
165+
**setCleanupInput**
166166

167-
Set this to `false` to skip the entire clean up phase of the parser. If this is set to true the next 3 options will be ignored. Defaults to `true`.
167+
Set `setCleanupInput` to `false` to skip the entire clean up phase of the parser. If this is set to true the next 3 options will be ignored. Defaults to `true`.
168168

169-
**removeScripts**
169+
**setRemoveScripts**
170170

171-
Set this to `false` to skip removing the script tags from the document body. This might have adverse effects. Defaults to `true`.
171+
Set `setRemoveScripts` to `false` to skip removing the script tags from the document body. This might have adverse effects. Defaults to `true`.
172172

173-
**removeStyles**
173+
**setRemoveStyles**
174174

175-
Set this to `false` to skip removing of style tags from the document body. This might have adverse effects. Defaults to `true`.
175+
Set `setRemoveStyles` to `false` to skip removing of style tags from the document body. This might have adverse effects. Defaults to `true`.
176176

177-
**preserveLineBreaks**
177+
**setPreserveLineBreaks**
178178

179-
Preserves Line Breaks if set to `true`. If set to `false` line breaks are cleaned up as part of the input clean up process. Defaults to `false`.
179+
`setPreserveLineBreaks` preserves line Breaks if set to `true`. If set to `false` line breaks are cleaned up as part of the input clean up process. Defaults to `false`.
180180

181-
**removeDoubleSpace**
181+
**setRemoveDoubleSpace**
182182

183-
Set this to `false` if you want to preserve whitespace inside of text nodes. It is set to `true` by default.
183+
Set `setRemoveDoubleSpace` to `false` if you want to preserve whitespace inside of text nodes. It is set to `true` by default.
184184

185-
**removeSmartyScripts**
185+
**setRemoveSmartyScripts**
186186

187-
Set this to `false` if you want to preserve smarty script found in the html content. It is set to `true` by default.
187+
Set `setRemoveSmartyScripts` to `false` if you want to preserve smarty script found in the html content. It is set to `true` by default.
188188

189-
**htmlSpecialCharsDecode**
189+
**setHtmlSpecialCharsDecode**
190190

191-
By default this is set to `false`. Setting this to `true` will apply the php function `htmlspecialchars_decode` too all attribute values and text nodes.
191+
By default `setHtmlSpecialCharsDecode` is set to `false`. Setting this to `true` will apply the php function `htmlspecialchars_decode` too all attribute values and text nodes.
192192

193-
**selfClosing**
193+
**setSelfClosing**
194194

195195
This option contains an array of all self closing tags. These tags must be self closing and the parser will force them to be so if you have strict turned on. You can update this list with any additional tags that can be used as a self closing tag when using strict. You can also remove tags from this array or clear it out completly.
196196

197-
**noSlash**
197+
**setNoSlash**
198198

199199
This option contains an array of all tags that can not be self closing. The list starts off as empty but you can add elements as you wish.
200200

0 commit comments

Comments
 (0)