<<<<<<< Updated upstream:web_root/documentation/html/classJSMin.html
Tina4Stack  v1.0.1 =======
Tina4 >>>>>>> Stashed changes:documentation/html/classJSMin.html
The Tina4 Stack
JSMin Class Reference

Public Member Functions

 __construct ($input="")
 
 min ()
 

Static Public Member Functions

static minify ($js)
 

Public Attributes

const ORD_LF = 10
 
const ORD_SPACE = 32
 
const ACTION_KEEP_A = 1
 
const ACTION_DELETE_A = 2
 
const ACTION_DELETE_A_B = 3
 

Protected Member Functions

 action ($command)
 
 get ()
 
 isEOF ($a)
 
 next ()
 
 peek ()
 
 consumeSingleLineComment ()
 
 consumeMultipleLineComment ()
 
 isRegexpLiteral ()
 
 isAlphaNum ($c)
 

Protected Attributes

 $a = "\n"
 
 $b = ''
 
 $input = ''
 
 $inputIndex = 0
 
 $inputLength = 0
 
 $lookAhead = null
 
 $output = ''
 
 $lastByteOut = ''
 
 $keptComment = ''
 

Constructor & Destructor Documentation

JSMin::__construct (   $input = "")
Parameters
string$input

Member Function Documentation

JSMin::action (   $command)
protected

ACTION_KEEP_A = Output A. Copy B to A. Get the next B. ACTION_DELETE_A = Copy B to A. Get the next B. ACTION_DELETE_A_B = Get the next B.

Parameters
int$command
Exceptions
JSMin_UnterminatedRegExpException|JSMin_UnterminatedStringException
JSMin::consumeMultipleLineComment ( )
protected

Consume a multiple line comment from input (possibly retaining it)

Exceptions
JSMin_UnterminatedCommentException
JSMin::consumeSingleLineComment ( )
protected

Consume a single line comment from input (possibly retaining it)

JSMin::get ( )
protected

Return the next character from stdin. Watch out for lookahead. If the character is a control character, translate it to a space or linefeed.

Returns
string
JSMin::isAlphaNum (   $c)
protected

Return true if the character is a letter, digit, underscore, dollar sign, or non-ASCII character.

Parameters
string$c
Returns
bool
JSMin::isEOF (   $a)
protected

Does $a indicate end of input?

Parameters
string$a
Returns
bool
JSMin::isRegexpLiteral ( )
protected
Returns
bool
JSMin::min ( )

Perform minification, return result

Returns
string
static JSMin::minify (   $js)
static

Minify Javascript.

Parameters
string$jsJavascript to be minified
Returns
string
JSMin::next ( )
protected

Get the next character, skipping over comments. Some comments may be preserved.

Returns
string
JSMin::peek ( )
protected

Get next char (without getting it). If is ctrl character, translate to a space or newline.

Returns
string

Member Data Documentation

JSMin::$a = "\n"
protected
JSMin::$b = ''
protected
JSMin::$input = ''
protected
JSMin::$inputIndex = 0
protected
JSMin::$inputLength = 0
protected
JSMin::$keptComment = ''
protected
JSMin::$lastByteOut = ''
protected
JSMin::$lookAhead = null
protected
JSMin::$output = ''
protected
const JSMin::ACTION_DELETE_A = 2
const JSMin::ACTION_DELETE_A_B = 3
const JSMin::ACTION_KEEP_A = 1
const JSMin::ORD_LF = 10
const JSMin::ORD_SPACE = 32

The documentation for this class was generated from the following file:
<<<<<<< Updated upstream:web_root/documentation/html/classJSMin.html ======= >>>>>>> Stashed changes:documentation/html/classJSMin.html