public function add_style_load_url($urls) { $hub = Upfront_PublicStylesheets_Registry::get_instance(); $styles = $hub->get_all(); if (empty($styles)) { return $urls; } $ckey = $this->_cache->key(self::TYPE_STYLE, $styles); $raw_cache_key = $ckey->get_hash(); $cache = $this->_debugger->is_active() ? false : $this->_cache->get($ckey); if (empty($cache)) { foreach ($styles as $key => $frags) { //$path = upfront_element_dir($frags[0], $frags[1]); //if (file_exists($path)) $cache .= "/* {$key} */\n" . file_get_contents($path) . "\n"; if (empty($frags)) { continue; } $style = $this->_get_style_contents($frags); if (!empty($style)) { $cache .= "/* {$key} */\n{$style}\n"; } } if (!$this->_debugger->is_active(Upfront_Debug::STYLE)) { $cache = Upfront_StylePreprocessor::compress($cache); } $this->_cache->set($ckey, $cache); } $url = Upfront_VirtualPage::get_url(join('/', array('upfront-dependencies', 'styles', $raw_cache_key))); $urls[] = $url; return $urls; }