PHP 클래스 Minify_Build, minify

in config file $groupSources = array( 'js' => array('file1.js', 'file2.js') ,'css' => array('file1.css', 'file2.css', 'file3.css') ) during HTML generation $jsBuild = new Minify_Build($groupSources['js']); $cssBuild = new Minify_Build($groupSources['css']); $script = ""; $link = ""; in min.php Minify::serve('Groups', array( 'groups' => $groupSources ,'setExpires' => (time() + 86400 * 365) ));
저자: Stephen Clay ([email protected])
파일 보기 프로젝트 열기: mrclay/minify 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$ampersand string String to use as ampersand in uri(). Set this to '&' if you are not HTML-escaping URIs.
$lastModified integer Last modification time of all files in the build

공개 메소드들

메소드 설명
__construct ( array $sources ) : null Create a build object
uri ( string $uri, boolean $forceAmpersand = false ) : string Get a time-stamped URI

메소드 상세

__construct() 공개 메소드

Create a build object
public __construct ( array $sources ) : null
$sources array array of Minify_Source objects and/or file paths
리턴 null

uri() 공개 메소드

echo $b->uri('/site.js'); outputs "/site.js?1678242" echo $b->uri('/scriptaculous.js?load=effects'); outputs "/scriptaculous.js?load=effects&1678242"
public uri ( string $uri, boolean $forceAmpersand = false ) : string
$uri string
$forceAmpersand boolean (default = false) Force the use of ampersand to append the timestamp to the URI.
리턴 string

프로퍼티 상세

$ampersand 공개적으로 정적으로 프로퍼티

String to use as ampersand in uri(). Set this to '&' if you are not HTML-escaping URIs.
public static string $ampersand
리턴 string

$lastModified 공개적으로 프로퍼티

Last modification time of all files in the build
public int $lastModified
리턴 integer