static function cssAbsoluteUrl($abs, $content)
 {
     $images = array();
     $parse = parse_url($abs);
     $abs = $parse['path'];
     if (preg_match('`(\\.\\w{1,3}|/)$`', $abs)) {
         $abs = dirname($abs);
     }
     if (self::$webroot === null) {
         self::$webroot = Router::url('/');
     }
     $baseUrl = self::$webroot . 'css_minified/';
     $assetPath = Configure::read('App.www_root') . 'css_minified';
     preg_match_all('`url\\((\'|\\")?(?!data:image)((\\w|\\.|\\/)+[^\\)]+[^\'\\"])(\'|\\")?\\)`', $content, $grep);
     $pattern = array();
     $replace = array();
     foreach ($grep[2] as $k => $relative) {
         $filePath = realpath(APP . MinifyUtils::getPath($abs . DS . $relative));
         /*
          * Si il n'a pas déjà été traité, on copie ce fichier vers /webroot/css_minified
          * avec un nom MD5 qui va bien puis on remplace l'url dans la CSS par ce fichier racine
          */
         if ($filePath !== false) {
             // Extrait uniquement le fichier et laisse les fragments/paramètres
             preg_match('/((#|\\?).*[^\\)"\'])/', $grep[0][$k], $fragments);
             // Ajoute le pattern de recherche pour remplacement
             $pattern[] = '`' . preg_quote($grep[0][$k]) . '`';
             $md5name = md5($filePath);
             if (!isset($images[$md5name])) {
                 $fileInfo = MinifyUtils::getFileInfo($filePath, $assetPath);
                 // fichier destination n'existe pas
                 if (!file_exists($fileInfo['destfile'])) {
                     // on le copie
                     copy($fileInfo['srcfile'], $fileInfo['destfile']);
                 }
                 $images[$fileInfo['md5name']] = $fileInfo;
             }
             $replace[] = 'url("' . $baseUrl . $images[$md5name]['destname'] . (!empty($fragments) ? $fragments[0] : '') . '")';
         }
     }
     return preg_replace($pattern, $replace, $content);
 }