Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
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 676 of file JavascriptTool.php.

Constructor & Destructor Documentation

__construct (   $input)

Setup process

Definition at line 706 of file JavascriptTool.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 754 of file JavascriptTool.php.

get ( )
protected

Get next char. Convert ctrl char to space.

Definition at line 837 of file JavascriptTool.php.

isAlphaNum (   $c)
protected

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

Definition at line 870 of file JavascriptTool.php.

isRegexpLiteral ( )
protected

Definition at line 809 of file JavascriptTool.php.

min ( )

Perform minification, return result

Definition at line 715 of file JavascriptTool.php.

static minify (   $js)
static

Minify Javascript

Parameters
string$jsJavascript to be minified
Returns
string

Definition at line 697 of file JavascriptTool.php.

multipleLineComment ( )
protected

Definition at line 891 of file JavascriptTool.php.

next ( )
protected

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

Definition at line 921 of file JavascriptTool.php.

peek ( )
protected

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

Definition at line 861 of file JavascriptTool.php.

singleLineComment ( )
protected

Definition at line 875 of file JavascriptTool.php.

Field Documentation

$a = "\n"
protected

Definition at line 683 of file JavascriptTool.php.

$b = ''
protected

Definition at line 684 of file JavascriptTool.php.

$input = ''
protected

Definition at line 685 of file JavascriptTool.php.

$inputIndex = 0
protected

Definition at line 686 of file JavascriptTool.php.

$inputLength = 0
protected

Definition at line 687 of file JavascriptTool.php.

$lookAhead = null
protected

Definition at line 688 of file JavascriptTool.php.

$output = ''
protected

Definition at line 689 of file JavascriptTool.php.

const ACTION_DELETE_A = 2

Definition at line 680 of file JavascriptTool.php.

const ACTION_DELETE_A_B = 3

Definition at line 681 of file JavascriptTool.php.

const ACTION_KEEP_A = 1

Definition at line 679 of file JavascriptTool.php.

const ORD_LF = 10

Definition at line 677 of file JavascriptTool.php.

const ORD_SPACE = 32

Definition at line 678 of file JavascriptTool.php.


The documentation for this class was generated from the following file: