PHP 클래스 titanscss_server

저자: Leaf Corcoran ([email protected])
파일 보기 프로젝트 열기: gambitph/titan-framework

공개 메소드들

메소드 설명
__construct ( string $dir, string $cacheDir = null, scssc | null $scss = null ) Constructor
serve ( string $salt = '' ) Compile requested scss and serve css. Outputs HTTP response.
serveFrom ( string $path ) Helper method to serve compiled scss

보호된 메소드들

메소드 설명
cacheName ( $fname ) : string Get path to cached .css file
compile ( string $in, string $out ) : string Compile .scss file
findInput ( ) : string Get path to requested .scss file
importsCacheName ( $out ) : string Get path to cached imports
inputName ( ) : string | null Get name of requested .scss file
join ( string $left, string $right ) : string Join path components
needsCompile ( string $in, string $out ) : boolean Determine whether .scss file needs to be re-compiled.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $dir, string $cacheDir = null, scssc | null $scss = null )
$dir string Root directory to .scss files
$cacheDir string Cache directory
$scss scssc | null SCSS compiler instance

cacheName() 보호된 메소드

Get path to cached .css file
protected cacheName ( $fname ) : string
리턴 string

compile() 보호된 메소드

Compile .scss file
protected compile ( string $in, string $out ) : string
$in string Input path (.scss)
$out string Output path (.css)
리턴 string

findInput() 보호된 메소드

Get path to requested .scss file
protected findInput ( ) : string
리턴 string

importsCacheName() 보호된 메소드

Get path to cached imports
protected importsCacheName ( $out ) : string
리턴 string

inputName() 보호된 메소드

Get name of requested .scss file
protected inputName ( ) : string | null
리턴 string | null

join() 보호된 메소드

Join path components
protected join ( string $left, string $right ) : string
$left string Path component, left of the directory separator
$right string Path component, right of the directory separator
리턴 string

needsCompile() 보호된 메소드

Determine whether .scss file needs to be re-compiled.
protected needsCompile ( string $in, string $out ) : boolean
$in string Input path
$out string Output path
리턴 boolean True if compile required.

serve() 공개 메소드

Compile requested scss and serve css. Outputs HTTP response.
public serve ( string $salt = '' )
$salt string Prefix a string to the filename for creating the cache name hash

serveFrom() 공개 정적인 메소드

Helper method to serve compiled scss
public static serveFrom ( string $path )
$path string Root path