PHP 클래스 MiniAsset\Output\AssetCacher

Similar to AssetWriter except this class takes a more simplistic approach to writing cache files. It also provides ways to read existing cache files.
상속: use trait FreshTrait
파일 보기 프로젝트 열기: markstory/mini-asset 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$path string The output path
$theme string The theme currently being built.

공개 메소드들

메소드 설명
__construct ( $path, $theme = null )
buildFileName ( AssetTarget $target ) : string Get the final build file name for a target.
ensureDir ( ) : void Create the output directory if it doesn't already exist.
outputDir ( AssetTarget $target ) : string Get the output dir
read ( AssetTarget $target ) : string Get the cached result for a build target.
write ( AssetTarget $target, $contents )

메소드 상세

__construct() 공개 메소드

public __construct ( $path, $theme = null )

buildFileName() 공개 메소드

Get the final build file name for a target.
public buildFileName ( AssetTarget $target ) : string
$target MiniAsset\AssetTarget The target to get a name for.
리턴 string

ensureDir() 공개 메소드

Create the output directory if it doesn't already exist.
public ensureDir ( ) : void
리턴 void

outputDir() 공개 메소드

Used to locate outputs when determining freshness.
public outputDir ( AssetTarget $target ) : string
$target MiniAsset\AssetTarget
리턴 string The path

read() 공개 메소드

Get the cached result for a build target.
public read ( AssetTarget $target ) : string
$target MiniAsset\AssetTarget The target to get content for.
리턴 string

write() 공개 메소드

public write ( AssetTarget $target, $contents )
$target MiniAsset\AssetTarget

프로퍼티 상세

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

The output path
protected string $path
리턴 string

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

The theme currently being built.
protected string $theme
리턴 string