File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 99 * Parser class parses CSS from text into a data structure.
1010 */
1111class Parser {
12- private $ sText ;
13- private $ iLineNo ;
14-
1512 private $ oParserState ;
1613
1714 /**
@@ -23,24 +20,21 @@ class Parser {
2320 * @param int $iLineNo
2421 */
2522 public function __construct ($ sText , Settings $ oParserSettings = null , $ iLineNo = 1 ) {
26- $ this ->sText = $ sText ;
2723 if ($ oParserSettings === null ) {
2824 $ oParserSettings = Settings::create ();
2925 }
30- $ this ->oParserSettings = $ oParserSettings ;
31- $ this ->iLineNo = $ iLineNo ;
26+ $ this ->oParserState = new ParserState ($ sText , $ oParserSettings , $ iLineNo );
3227 }
3328
3429 public function setCharset ($ sCharset ) {
35- $ this ->oParserHelper ->setCharset ($ sCharset );
30+ $ this ->oParserState ->setCharset ($ sCharset );
3631 }
3732
3833 public function getCharset () {
39- $ this ->oParserHelper ->getCharset ();
34+ $ this ->oParserState ->getCharset ();
4035 }
4136
4237 public function parse () {
43- $ this ->oParserState = new ParserState ($ this ->sText , $ this ->oParserSettings );
4438 return Document::parse ($ this ->oParserState );
4539 }
4640
You can’t perform that action at this time.
0 commit comments