function &compile($url, $css, &$pipeline) { if ($this->_isCached($url)) { return $this->_readCached($url); } else { $cssruleset = new CSSRuleset(); $cssruleset->parse_css($css, $pipeline); $this->_putCached($url, $cssruleset); return $cssruleset; } }
function outputRuleset(CSSRuleset $o) { $decs = $o->getDeclarations(); $sels = $o->getSelectors(); if (!$decs->isEmpty()) { if ($decs->queryFilterAll('hidemac', true)) { return '/*\\*/' . $this->outputSelectors($sels) . '{' . $this->outputDeclarations($decs, array('hidemac' => true)) . "}/**/\n"; } return $this->outputSelectors($sels) . '{' . $this->outputDeclarations($decs) . "}\n"; } return ''; }
function import_rulesets($syntax_rulesets_collection) { $ruleset = new CSSRuleset(); $syntax_rulesets = $syntax_rulesets_collection->get(); foreach ($syntax_rulesets as $syntax_ruleset) { $selectors = $this->import_ruleset_selectors($syntax_ruleset); $body = $this->import_ruleset_body($syntax_ruleset); foreach ($selectors as $selector) { $rule =& new CSSRule($selector, $body, $this->peek_base_url(), $this->make_next_order()); } $ruleset->add_rule($rule); } return $ruleset; }