PHP 클래스 MiniAsset\AssetCollection

Asset targets are lazily evaluated as they are fetched from the collection By using get() an AssetTarget and its dependent files will be created and verified.
상속: implements Countabl\Countable, implements Iterato\Iterator
파일 보기 프로젝트 열기: markstory/mini-asset 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$factory Factory A factory instance that can be used to lazily build targets.
$index integer The current position.
$indexed array The assets indexed by name.
$items array The assets indexed numerically.

공개 메소드들

메소드 설명
__construct ( array $targets, Factory $factory ) Constructor. You can provide an array or any traversable object
append ( AssetTarget $target ) : void Append an asset to the collection.
contains ( string $name ) : boolean Check whether or not the collection contains the named asset.
count ( ) : integer Get the length of the collection.
current ( )
get ( string $name ) : null | AssetTarget Get an asset from the collection
key ( )
next ( )
remove ( string $name ) : void Remove an asset from the collection
rewind ( )
valid ( )

메소드 상세

__construct() 공개 메소드

Constructor. You can provide an array or any traversable object
public __construct ( array $targets, Factory $factory )
$targets array
$factory Factory

append() 공개 메소드

Append an asset to the collection.
public append ( AssetTarget $target ) : void
$target AssetTarget The target to append
리턴 void

contains() 공개 메소드

Check whether or not the collection contains the named asset.
public contains ( string $name ) : boolean
$name string The name of the asset you want.
리턴 boolean

count() 공개 메소드

Get the length of the collection.
public count ( ) : integer
리턴 integer

current() 공개 메소드

public current ( )

get() 공개 메소드

Get an asset from the collection
public get ( string $name ) : null | AssetTarget
$name string The name of the asset you want.
리턴 null | AssetTarget Either null or the asset target.

key() 공개 메소드

public key ( )

next() 공개 메소드

public next ( )

remove() 공개 메소드

Remove an asset from the collection
public remove ( string $name ) : void
$name string The name of the asset you want to remove
리턴 void

rewind() 공개 메소드

public rewind ( )

valid() 공개 메소드

public valid ( )

프로퍼티 상세

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

A factory instance that can be used to lazily build targets.
protected Factory,MiniAsset $factory
리턴 Factory

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

The current position.
protected int $index
리턴 integer

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

The assets indexed by name.
protected array $indexed
리턴 array

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

The assets indexed numerically.
protected array $items
리턴 array