PEEL Shopping
Open source ecommerce : PEEL Shopping
Minify_CSS.php
Go to the documentation of this file.
1 <?php
17 class Minify_CSS {
18 
56  public static function minify($css, $options = array())
57  {
58  $options = array_merge(array(
59  'removeCharsets' => true,
60  'currentDir' => null,
61  'docRoot' => $_SERVER['DOCUMENT_ROOT'],
62  'prependRelativePath' => null,
63  'symlinks' => array(),
64  'do_compress' => true,
65  ), $options);
66 
67  if ($options['removeCharsets']) {
68  $css = preg_replace('/@charset[^;]+;\\s*/', '', $css);
69  }
70  require_once $GLOBALS['dirroot'].'/lib/class/Minify_CSS_Compressor.php';
71  $css = Minify_CSS_Compressor::process($css, $options);
72 
73  if (! $options['currentDir'] && ! $options['prependRelativePath']) {
74  return $css;
75  }
76  require_once $GLOBALS['dirroot'].'/lib/class/Minify_CSS_UriRewriter.php';
77  if ($options['currentDir']) {
79  $css
80  ,$options['currentDir']
81  ,$options['docRoot']
82  ,$options['symlinks']
83  );
84  }
85  if($options['prependRelativePath']) {
87  $css
88  ,$options['prependRelativePath']
89  );
90  }
91  return $css;
92  }
93 }
static minify($css, $options=array())
Minify a CSS string.
Definition: Minify_CSS.php:56
static process($css, $options=array())
Minify a CSS string.
$GLOBALS['page_columns_count']
static prepend($css, $path)
In CSS content, prepend a path to relative URIs.
static rewrite($css, $currentDir, $docRoot=null, $symlinks=array())
In CSS content, rewrite file relative URIs as root relative.

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:30:03 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.