fresfj / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Classes need overhaul #124

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
UriRewriter should be a general use class for rewriting URLs in CSS, and 
should take in $css and an Algorithm (Root or Prepend) object to do its 
work. The Root algorithm would be responsible for things like currentDir, 
docRoot, symlinks, etc.

Original issue reported on code.google.com by mrclay....@gmail.com on 30 Jun 2009 at 7:04

GoogleCodeExporter commented 9 years ago
Ideally all classes should be reworked:
* No work in constructors
* No global state: static methods, hidden dependencies
* HTML/CSS_Compressor: split work into several methods
* Source changes proposed in Issue 50
* Less magic API: Minify constructor accepts a controller (options set in its 
constructor) and a cache. serve() accepts additional options
* Base controller: 
  analyzeSources() & getDefaultMinifyOptions() move to Minify
  __construct() takes Request object and options array
* Request obj (base on Solar_Request w/ some fixes from Zend?) light as possible

maybe a "Minifier" which compresses sources and combines result.

Original comment by mrclay....@gmail.com on 1 Jul 2009 at 8:18