PHP 클래스 Sprockets\Locator

파일 보기 프로젝트 열기: nami-doc/sprockets-php

공개 메소드들

메소드 설명
__construct ( $pipeline, $paths, $prefix )
getDirectoriesFor ( $ext )
getDirectory ( $name, $ext ) first-depth find. only returns 1 result
getFile ( $name, $type )
getFileListName ( )
getFilesUnder ( $name, $ext, $depth ) vomit
getNameAndExtension ( $name ) reads name and extension for a file name
getPathsHash ( )
getTypeForExt ( $ext ) : string returns the named type of an extension ie png, gif, jpg and jpeg are images, no need to have separate folders same applies to otf and ttf, they're fonts
hasDirectory ( $name )
hasFile ( $name, $type )
hasProcessedFile ( $file )
resolveFile ( $name )
save ( ) Calling file_put_contents within a destructor will cause the file to be written in SERVER_ROOT.
setDefaultExtension ( $ext ) # }
skipFile ( $file )

비공개 메소드들

메소드 설명
findFile ( string $name, string $ext ) finds a file, whether it has many extensions or not findFile('xe', 'css') will find 'xs.css.less'

메소드 상세

__construct() 공개 메소드

public __construct ( $pipeline, $paths, $prefix )

getDirectoriesFor() 공개 메소드

public getDirectoriesFor ( $ext )

getDirectory() 공개 메소드

first-depth find. only returns 1 result
public getDirectory ( $name, $ext )

getFile() 공개 메소드

public getFile ( $name, $type )

getFileListName() 공개 메소드

public getFileListName ( )

getFilesUnder() 공개 메소드

vomit
public getFilesUnder ( $name, $ext, $depth )

getNameAndExtension() 공개 메소드

reads name and extension for a file name
public getNameAndExtension ( $name )

getPathsHash() 공개 메소드

public getPathsHash ( )

getTypeForExt() 공개 메소드

returns the named type of an extension ie png, gif, jpg and jpeg are images, no need to have separate folders same applies to otf and ttf, they're fonts
public getTypeForExt ( $ext ) : string
리턴 string ext's named type, or extension itself

hasDirectory() 공개 메소드

public hasDirectory ( $name )

hasFile() 공개 메소드

public hasFile ( $name, $type )

hasProcessedFile() 공개 메소드

public hasProcessedFile ( $file )

resolveFile() 공개 메소드

public resolveFile ( $name )

save() 공개 메소드

..
public save ( )

setDefaultExtension() 공개 메소드

# }
public setDefaultExtension ( $ext )

skipFile() 공개 메소드

public skipFile ( $file )