Package
Class Package
Table of Contents
Methods
- __construct() : mixed
- Package constructor.
- addAsset() : $this
- Add asset.
- getAssets() : array<string|int, Asset>
- Get assets.
- getOrderedTypeList() : array<string|int, mixed>
- Get type list.
- isOnDemand() : bool
- Return true if on demand.
- onDemand() : $this
- Enable loading by path for resources.
- toArray() : array<string|int, mixed>
- Convert to array.
Methods
__construct()
Package constructor.
public
__construct([array<string|int, Asset> $assets = [] ]) : mixed
Parameters
- $assets : array<string|int, Asset> = []
-
Assets.
addAsset()
Add asset.
public
addAsset(Asset $item) : $this
Parameters
- $item : Asset
-
Item.
Return values
$thisgetAssets()
Get assets.
public
getAssets([string $type = null ]) : array<string|int, Asset>
Parameters
- $type : string = null
-
Type.
Return values
array<string|int, Asset>getOrderedTypeList()
Get type list.
public
static getOrderedTypeList() : array<string|int, mixed>
Return values
array<string|int, mixed>isOnDemand()
Return true if on demand.
public
isOnDemand() : bool
Return values
boolonDemand()
Enable loading by path for resources.
public
onDemand() : $this
Default - content loading.
Return values
$thistoArray()
Convert to array.
public
toArray([string $type = null ]) : array<string|int, mixed>
Parameters
- $type : string = null
-
Type.