Moodle  2.2.1
http://www.collinsharper.com
JSMin Class Reference

Public Member Functions

 __construct ($input)
 min ()

Static Public Member Functions

static minify ($js)

Data Fields

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)
 isRegexpLiteral ()
 get ()
 peek ()
 isAlphaNum ($c)
 singleLineComment ()
 multipleLineComment ()
 next ()

Protected Attributes

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

Detailed Description

Definition at line 53 of file JSMin.php.


Constructor & Destructor Documentation

__construct ( input)

Setup process

Definition at line 83 of file JSMin.php.


Member Function Documentation

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.

Definition at line 131 of file JSMin.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get ( ) [protected]

Get next char. Convert ctrl char to space.

Definition at line 214 of file JSMin.php.

isAlphaNum ( c) [protected]

Is $c a letter, digit, underscore, dollar sign, escape, or non-ASCII?

Definition at line 247 of file JSMin.php.

Here is the caller graph for this function:

isRegexpLiteral ( ) [protected]

Definition at line 186 of file JSMin.php.

Here is the call graph for this function:

Here is the caller graph for this function:

min ( )

Perform minification, return result

Definition at line 92 of file JSMin.php.

Here is the call graph for this function:

static minify ( js) [static]

Minify Javascript

Parameters:
string$jsJavascript to be minified
Returns:
string

Definition at line 74 of file JSMin.php.

Here is the caller graph for this function:

multipleLineComment ( ) [protected]

Definition at line 268 of file JSMin.php.

Here is the call graph for this function:

Here is the caller graph for this function:

next ( ) [protected]

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

Definition at line 298 of file JSMin.php.

Here is the call graph for this function:

Here is the caller graph for this function:

peek ( ) [protected]

Get next char. If is ctrl character, translate to a space or newline.

Definition at line 238 of file JSMin.php.

Here is the caller graph for this function:

singleLineComment ( ) [protected]

Definition at line 252 of file JSMin.php.

Here is the caller graph for this function:


Field Documentation

$a = "\n" [protected]

Definition at line 60 of file JSMin.php.

$b = '' [protected]

Definition at line 61 of file JSMin.php.

$input = '' [protected]

Definition at line 62 of file JSMin.php.

$inputIndex = 0 [protected]

Definition at line 63 of file JSMin.php.

$inputLength = 0 [protected]

Definition at line 64 of file JSMin.php.

$lookAhead = null [protected]

Definition at line 65 of file JSMin.php.

$output = '' [protected]

Definition at line 66 of file JSMin.php.

const ACTION_DELETE_A = 2

Definition at line 57 of file JSMin.php.

const ACTION_DELETE_A_B = 3

Definition at line 58 of file JSMin.php.

const ACTION_KEEP_A = 1

Definition at line 56 of file JSMin.php.

const ORD_LF = 10

Definition at line 54 of file JSMin.php.

const ORD_SPACE = 32

Definition at line 55 of file JSMin.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations