src/FS/File/CSS/Compressor.php
public function compressFile( $fileUri )
	{
		if( !file_exists( $fileUri ) )
			throw new Exception( "Style File '".$fileUri."' is not existing." );

		$content	= self::compressString( file_get_contents( $fileUri ) );
		$pathName	= dirname( $fileUri );
		$styleFile	= basename( $fileUri );
		$styleName	= preg_replace( "@\.css$@", "", $styleFile );
		$fileName	= $this->prefix.$styleName.$this->suffix.".css";
		$fileUri	= $pathName."/".$fileName;
		$fileUri	= str_replace( "\\", "/", $fileUri );
		file_put_contents( $fileUri, $content );
		return $fileUri;
	}
public function compressFile( $fileUri )
	{
		if( !file_exists( $fileUri ) )
			throw new Exception( "Style File '".$fileUri."' is not existing." );

		$content	= self::compressString( file_get_contents( $fileUri ) );
		$pathName	= dirname( $fileUri );
		$styleFile	= basename( $fileUri );
		$styleName	= preg_replace( "@\.css$@", "", $styleFile );
		$fileName	= $this->prefix.$styleName.$this->suffix.".css";
		$fileUri	= $pathName."/".$fileName;
		$fileUri	= str_replace( "\\", "/", $fileUri );
		file_put_contents( $fileUri, $content );
		return $fileUri;
	}
public function compressFile ( $ fileUri ) { if ( ! file_exists ( $ fileUri ) ) throw new Exception ( "Style File '" . $ fileUri . "' is not existing." ) ; $ content = self :: compressString ( file_get_contents ( $ fileUri ) ) ; $ pathName = dirname ( $ fileUri ) ; $ styleFile = basename ( $ fileUri ) ; $ styleName = preg_replace ( "@\.css$@" , "" , $ styleFile ) ; $ fileName = $ this -> prefix . $ styleName . $ this -> suffix . ".css" ; $ fileUri = $ pathName . "/" . $ fileName ; $ fileUri = str_replace ( "\\" , "/" , $ fileUri ) ; file_put_contents ( $ fileUri , $ content ) ; return $ fileUri ; }
Reads and compresses a CSS File and returns Length of compressed File.
@access		public
@param		string		$fileUri		Full URI of CSS File
@return		string
Reads and compresses a CSS File and returns Length of compressed File .