@@ -161,34 +161,6 @@ public function loadFromUrl($url, $options = [], CurlInterface $curl = null)
161161 return $ this ->loadStr ($ content , $ options );
162162 }
163163
164- /**
165- * Parsers the html of the given string. Used for load(), loadFromFile(),
166- * and loadFromUrl().
167- *
168- * @param string $str
169- * @param array $option
170- * @return $this
171- */
172- public function loadStr ($ str , $ option )
173- {
174- $ this ->options = new Options ;
175- $ this ->options ->setOptions ($ this ->globalOptions )
176- ->setOptions ($ option );
177-
178- $ this ->rawSize = strlen ($ str );
179- $ this ->raw = $ str ;
180-
181- $ html = $ this ->clean ($ str );
182-
183- $ this ->size = strlen ($ str );
184- $ this ->content = new Content ($ html );
185-
186- $ this ->parse ();
187- $ this ->detectCharset ();
188-
189- return $ this ;
190- }
191-
192164 /**
193165 * Sets a global options array to be used by all load calls.
194166 *
@@ -350,6 +322,34 @@ protected function loadStr($str, $option)
350322 return $ this ;
351323 }
352324
325+ /**
326+ * Parsers the html of the given string. Used for load(), loadFromFile(),
327+ * and loadFromUrl().
328+ *
329+ * @param string $str
330+ * @param array $option
331+ * @return $this
332+ */
333+ public function loadStr ($ str , $ option )
334+ {
335+ $ this ->options = new Options ;
336+ $ this ->options ->setOptions ($ this ->globalOptions )
337+ ->setOptions ($ option );
338+
339+ $ this ->rawSize = strlen ($ str );
340+ $ this ->raw = $ str ;
341+
342+ $ html = $ this ->clean ($ str );
343+
344+ $ this ->size = strlen ($ str );
345+ $ this ->content = new Content ($ html );
346+
347+ $ this ->parse ();
348+ // $this->detectCharset(); removed as not needed in tegans branch
349+
350+ return $ this ;
351+ }
352+
353353 /**
354354 * Checks if the load methods have been called.
355355 *
0 commit comments