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 9
9
* Parser class parses CSS from text into a data structure.
10
10
*/
11
11
class Parser {
12
- private $ sText ;
13
- private $ iLineNo ;
14
-
15
12
private $ oParserState ;
16
13
17
14
/**
@@ -23,24 +20,21 @@ class Parser {
23
20
* @param int $iLineNo
24
21
*/
25
22
public function __construct ($ sText , Settings $ oParserSettings = null , $ iLineNo = 1 ) {
26
- $ this ->sText = $ sText ;
27
23
if ($ oParserSettings === null ) {
28
24
$ oParserSettings = Settings::create ();
29
25
}
30
- $ this ->oParserSettings = $ oParserSettings ;
31
- $ this ->iLineNo = $ iLineNo ;
26
+ $ this ->oParserState = new ParserState ($ sText , $ oParserSettings , $ iLineNo );
32
27
}
33
28
34
29
public function setCharset ($ sCharset ) {
35
- $ this ->oParserHelper ->setCharset ($ sCharset );
30
+ $ this ->oParserState ->setCharset ($ sCharset );
36
31
}
37
32
38
33
public function getCharset () {
39
- $ this ->oParserHelper ->getCharset ();
34
+ $ this ->oParserState ->getCharset ();
40
35
}
41
36
42
37
public function parse () {
43
- $ this ->oParserState = new ParserState ($ this ->sText , $ this ->oParserSettings );
44
38
return Document::parse ($ this ->oParserState );
45
39
}
46
40
You can’t perform that action at this time.
0 commit comments