PHP Class Xpressengine\Presenter\Html\Tags\CSSFile

Author: XE Developers ([email protected])
Inheritance: use trait AttributeTrait, use trait LocatableTrait, use trait MinifyTrait, use trait SortTrait, use trait TargetTrait, use trait EmptyStringTrait
Mostrar archivo Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$fileList CSSFile[] $fileList[filename] = CSSFile Instance
$files 해당 인스턴스에 포함된 파일들의 파일명 목록
$loaded boolean
$unloaded filename list

Public Methods

Method Description
__construct ( string | string[] $files ) 생성자. 파일경로를 전달받는다.
getFileList ( string $location = 'async.append', boolean $minified = false ) : array 로드된 파일 목록을 반환한다.
init ( array $fileList = [], Sorter $sorter = null ) : void init 전역 메소드이며, javascript 파일의 목록을 관리하기 위해 필요한 초기 작업으로 sorter와 file list를 설정한다.
load ( ) load this file
loadAsync ( ) : CSSFile load this file to async list
media ( string $media ) media
output ( string $location = 'head.append', boolean $minified = false ) : string 주어진 위치에 해당하는 로드된 CSS파일 목록을 출력한다.
render ( string $file, boolean | false $minified = false ) : string render
type ( string $type ) type
unload ( ) : void unload

Protected Methods

Method Description
asset ( string $file ) : string asset
getFile ( string $file, boolean $minified = false ) : string 로드된 파일을 반환한다.
resolveKey ( string $file ) : string key resolver

Method Details

__construct() public method

단 하나의 파일이나 배열형식의 다중 파일을 전달 받을 수 있다.
public __construct ( string | string[] $files )
$files string | string[] 파일경로

asset() protected method

asset
protected asset ( string $file ) : string
$file string file path
return string

getFile() protected method

로드된 파일을 반환한다.
protected getFile ( string $file, boolean $minified = false ) : string
$file string 파일경로
$minified boolean true일 경우, min파일을 반환한다.
return string

getFileList() public static method

로드된 파일 목록을 반환한다.
public static getFileList ( string $location = 'async.append', boolean $minified = false ) : array
$location string 파일 로드 위치
$minified boolean min 파일 반환 여부
return array

init() public static method

init 전역 메소드이며, javascript 파일의 목록을 관리하기 위해 필요한 초기 작업으로 sorter와 file list를 설정한다.
public static init ( array $fileList = [], Sorter $sorter = null ) : void
$fileList array js file의 목록
$sorter Xpressengine\Support\Sorter 우선순위 정렬을 위한 sorter
return void

load() public method

load this file
public load ( )

loadAsync() public method

load this file to async list
public loadAsync ( ) : CSSFile
return CSSFile

media() public method

media
public media ( string $media )
$media string media

output() public static method

주어진 위치에 해당하는 로드된 CSS파일 목록을 출력한다.
public static output ( string $location = 'head.append', boolean $minified = false ) : string
$location string 출력할 파일의 위치\n (head.append|head.prepend|body.append|body.prepend)
$minified boolean minified 파일을 출력할지 결정한다.
return string

render() public method

render
public render ( string $file, boolean | false $minified = false ) : string
$file string file path
$minified boolean | false minified
return string

resolveKey() protected method

key resolver
protected resolveKey ( string $file ) : string
$file string file path
return string

type() public method

type
public type ( string $type )
$type string type

unload() public method

unload
public unload ( ) : void
return void

Property Details

$fileList protected_oe static_oe property

$fileList[filename] = CSSFile Instance
protected static CSSFile[],Xpressengine\Presenter\Html\Tags $fileList
return CSSFile[]

$files protected_oe property

해당 인스턴스에 포함된 파일들의 파일명 목록
protected $files

$loaded protected_oe property

protected bool $loaded
return boolean

$unloaded protected_oe static_oe property

filename list
protected static $unloaded