Esempio n. 1
0
 public static function parseMasterStyles($masterContent)
 {
     $styles = array();
     if (strpos($masterContent, '.kwfup-webStandard') === false) {
         return $styles;
     }
     preg_match_all('#^ *.kwfup-webStandard *((span|p|h[1-6])\\.?([^ ]*)) *{([^}]*)} */\\* +(.*?) +\\*/#m', $masterContent, $m);
     foreach (array_keys($m[1]) as $i) {
         $tagName = $m[2][$i];
         $styles[] = array('id' => 'master' . $i, 'name' => $m[5][$i], 'tagName' => $tagName, 'className' => $m[3][$i], 'styles' => Kwf_Assets_Dependency_File_Css::expandAssetVariables($m[4][$i], 'web'));
     }
     return $styles;
 }