openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

JavascriptMinifierFilter.class.php (396B)


      1 <?php
      2 
      3 
      4 namespace cms\publish\filter;
      5 
      6 
      7 use JSqueeze;
      8 
      9 class JavascriptMinifierFilter extends AbstractFilter
     10 {
     11 	public $singleLine = true;
     12 	public $keepImportantComments = true;
     13 	public $specialVarRx = false;
     14 
     15 	public function filter( $value )
     16 	{
     17 		$jz = new JSqueeze();
     18 		return $jz->squeeze( $value, (bool)$this->singleLine, (bool)$this->keepImportantComments, (bool)$this->specialVarRx );
     19 	}
     20 }