PHP 클래스 Horde_JavascriptMinify, horde

저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_data mixed Original javascript data.
$_opts array Minification options.
$_sourcemap string Temporary file containing sourcemap data.

공개 메소드들

메소드 설명
__construct ( mixed $js, array $opts = [] ) Constructor.
__toString ( )
minify ( ) : string Return the minified javascript.
setOptions ( array $opts = [] ) Set minification options.
sourcemap ( ) : mixed Returns the sourcemap data.

보호된 메소드들

메소드 설명
_sourceUrls ( ) : string Creates a list of source comments linking to the original URLs of the source files.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( mixed $js, array $opts = [] )
$js mixed Either a string (the JS text to compress) or an array of URLs (keys) to filenames (values) containing the JS data to compress.
$opts array Additional options. See setOptions().

__toString() 공개 메소드

또한 보기: Horde_JavascriptMinify::minify()
public __toString ( )

_sourceUrls() 보호된 메소드

Needed in minification files to ensure that all license terms of the minified code (which may have been removed during the minification process) are accessible.
부터: 1.1.0
protected _sourceUrls ( ) : string
리턴 string Source URL data.

minify() 추상적인 공개 메소드

Return the minified javascript.
abstract public minify ( ) : string
리턴 string Minified javascript.

setOptions() 공개 메소드

Set minification options.
public setOptions ( array $opts = [] )
$opts array Options:
  - logger: (Horde_Log_Logger) Log object to use for log messages.

sourcemap() 공개 메소드

Only supported if javascript is data is provided via web-accessible static files. minify() must be called before this method will return any data.
public sourcemap ( ) : mixed
리턴 mixed The sourcemap data, or null if it doesn't exist.

프로퍼티 상세

$_data 보호되어 있는 프로퍼티

Original javascript data.
protected mixed $_data
리턴 mixed

$_opts 보호되어 있는 프로퍼티

Minification options.
protected array $_opts
리턴 array

$_sourcemap 보호되어 있는 프로퍼티

Temporary file containing sourcemap data.
protected string $_sourcemap
리턴 string