File tree Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -172,4 +172,24 @@ public function addHtmlToStore($rawHtml)
172172 {
173173 $ this ->htmlStore ->addHtmlSnippet ($ rawHtml );
174174 }
175+
176+ /**
177+ * @return $this
178+ */
179+ public function purgeHtmlStore ()
180+ {
181+ $ this ->htmlStore ->purge ();
182+
183+ return $ this ;
184+ }
185+
186+ /**
187+ * @return $this
188+ */
189+ public function purgeCssStore ()
190+ {
191+ $ this ->cssStore ->purge ();
192+
193+ return $ this ;
194+ }
175195}
Original file line number Diff line number Diff line change @@ -25,6 +25,16 @@ public function getStyles()
2525 return $ this ->styles ;
2626 }
2727
28+ /**
29+ * @return $this
30+ */
31+ public function purge ()
32+ {
33+ $ this ->styles = [];
34+
35+ return $ this ;
36+ }
37+
2838 /**
2939 * @param string $path
3040 *
Original file line number Diff line number Diff line change @@ -17,4 +17,14 @@ public function getSnippets()
1717 {
1818 return $ this ->snippets ;
1919 }
20+
21+ /**
22+ * @return $this
23+ */
24+ public function purge ()
25+ {
26+ $ this ->snippets = [];
27+
28+ return $ this ;
29+ }
2030}
Original file line number Diff line number Diff line change @@ -53,4 +53,15 @@ public function buildCriticalCssFromSnippets()
5353 {
5454 return $ this ->pageSpecificCssService ->buildExtractedRuleSet ();
5555 }
56+
57+ public function purgeHtmlStore ()
58+ {
59+ $ this ->pageSpecificCssService ->purgeHtmlStore ();
60+
61+ }
62+
63+ public function purgeCssStore ()
64+ {
65+ $ this ->pageSpecificCssService ->purgeCssStore ();
66+ }
5667}
You can’t perform that action at this time.
0 commit comments