/**
  *
  */
 protected function identifyInlineStyles()
 {
     $inlineGroup = new RokBooster_Compressor_InlineGroup(RokBooster_Compressor_InlineGroup::STATE_INCLUDE, 'text/css');
     $tags = pq($this->prefix . 'style[type=\'text/css\']', $this->document);
     foreach ($tags as $tag) {
         $inlineGroup->addItem(pq($tag, $this->document)->text());
     }
     $this->inline_styles[] = $inlineGroup;
     if ($this->isCacheExpired($inlineGroup->getChecksum()) && !$this->isBeingRendered($inlineGroup->getChecksum())) {
         $this->render_inline_styles[] = $inlineGroup;
         $this->setCurrentlyRendering($inlineGroup->getChecksum());
     }
 }
 /**
  *
  */
 protected function identifyInlineStyles()
 {
     $doc = JFactory::getDocument();
     foreach ($doc->_style as $mime => $content) {
         $inlineGroup = new RokBooster_Compressor_InlineGroup(RokBooster_Compressor_InlineGroup::STATE_INCLUDE, $mime);
         $inlineGroup->setContent($content);
         $this->inline_styles[] = $inlineGroup;
         $this->setCurrentlyRendering($inlineGroup);
         if ($this->isOutputExpired($inlineGroup, false) && !$this->isBeingRendered($inlineGroup)) {
             $this->render_inline_styles[] = $inlineGroup;
             $this->setCurrentlyRendering($inlineGroup);
         }
     }
 }
 /**
  * @param \RokBooster_Compressor_InlineGroup $inlinegroup
  *
  * @return string
  */
 protected function processInlineStyle(RokBooster_Compressor_InlineGroup &$inlinegroup)
 {
     $content = $inlinegroup->getContent();
     if ($this->options->imported_css) {
         try {
             $compiled_content = RokBooster_Compressor_CssAggregator::combine($content, $this->options->root_path);
             $content = $compiled_content;
         } catch (Exception $e) {
             JLog::add(JText::sprintf('PLG_SYSTEM_ROKBOOSTER_INLIN_CSS_COMPILE_ERROR', $e->getMessage()), JLog::ERROR, 'rokbooster');
         }
     }
     $content = $this->cleanEndLines($content);
     $inlinegroup->setResult(RokBooster_Compressor_Processor_YUI::_minify($content));
 }
Esempio n. 4
0
 /**
  * @param RokBooster_Compressor_InlineGroup $inlinegroup
  */
 public function writeInlineStyleFile(RokBooster_Compressor_InlineGroup $inlinegroup)
 {
     $this->write($inlinegroup->getChecksum(), $inlinegroup->getResult(), false);
 }
Esempio n. 5
0
 /**
  * @param \RokBooster_Compressor_InlineGroup $inlinegroup
  *
  * @return string
  */
 protected function processInlineStyle(RokBooster_Compressor_InlineGroup &$inlinegroup)
 {
     $content = $inlinegroup->getContent();
     if ($this->options->imported_css) {
         try {
             $compiled_content = RokBooster_Compressor_CssCompiler::compile($content, $this->options->root_path);
             $content = $compiled_content;
         } catch (Exception $e) {
         }
     }
     $content = $this->cleanEndLines($content);
     $inlinegroup->setResult(RokBooster_Compressor_Processor_YUI::_minify($content));
 }