# tasks/ext/jsmin/JsMin.php

jsmin.php - PHP implementation of Douglas Crockford's JSMin.

This is pretty much a direct port of jsmin.c to PHP with just a few PHP-specific performance tweaks. Also, whereas jsmin.c reads from stdin and outputs to stdout, this library accepts a string as input and returns another string as output.

PHP 5 or higher is required.

Permission is hereby granted to use this version of the library under the same terms as jsmin.c, which has the following license:

-- Copyright (c) 2002 Douglas Crockford (www.crockford.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The Software shall be used for Good, not Evil.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

## SOFTWARE.

Author
  Ryan Grove
Copyright
  2002 Douglas Crockford (jsmin.c)
Copyright
  2008 Ryan Grove (PHP port)
License
  MIT License
Link
  http://code.google.com/p/jsmin-php/
Package
  JSMin
Version
  1.1.1 (2008-03-02)

## \JSMin
jump to top

Package: JSMin

jsmin.php - PHP implementation of Douglas Crockford's JSMin.

This is pretty much a direct port of jsmin.c to PHP with just a few PHP-specific performance tweaks. Also, whereas jsmin.c reads from stdin and outputs to stdout, this library accepts a string as input and returns another string as output.

PHP 5 or higher is required.

Permission is hereby granted to use this version of the library under the same terms as jsmin.c, which has the following license:

-- Copyright (c) 2002 Douglas Crockford (www.crockford.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The Software shall be used for Good, not Evil.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

## SOFTWARE.

Author
  Ryan Grove
Copyright
  2002 Douglas Crockford (jsmin.c)
Copyright
  2008 Ryan Grove (PHP port)
License
  MIT License
Link
  http://code.google.com/p/jsmin-php/
Version
  1.1.1 (2008-03-02)

### Constants

`ORD_LF = 10`

`ORD_SPACE = 32`

### Properties

`$a= ''''`
Default value`''`Details

Type

`$b= ''''`
Default value`''`Details

Type

`$input= ''''`
Default value`''`Details

Type

`$inputIndex= '0'`
Default value `0` Details

Type

`$inputLength= '0'`
Default value `0` Details

Type

`$lookAhead= 'null'`
Default value `null` Details

Type

`$output= ''''`
Default value`''`Details

Type

### Methods

`__construct( $input ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$input |  |

`action( $d ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$d |  |

`get( ) : void`

`isAlphaNum( $c ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$c |  |

`min( ) : void`

`minify( $js ) : void`
static

Parameters

Name | Type | Description
--- | --- | ---
$js |  |

`next( ) : void`

`peek( ) : void`

## \JSMinException
jump to top

Package: JSMin

Parent(s)
  \Exception

### Methods

`__construct( ) : void`
inherited

Inherited from: \Exception::__construct()
`__toString( ) : void`
inherited

Inherited from: \Exception::__toString()
`getCode( ) : void`
final inherited

Inherited from: \Exception::getCode()
`getFile( ) : void`
final inherited

Inherited from: \Exception::getFile()
`getLine( ) : void`
final inherited

Inherited from: \Exception::getLine()
`getMessage( ) : void`
final inherited

Inherited from: \Exception::getMessage()
`getPrevious( ) : void`
final inherited

Inherited from: \Exception::getPrevious()
`getTrace( ) : void`
final inherited

Inherited from: \Exception::getTrace()
`getTraceAsString( ) : void`
final inherited

Inherited from: \Exception::getTraceAsString()
Documentation was generated by DocBlox 0.15.1.