PHP Class Pagekit\View\Asset\AssetFactory

Show file Open project: pagekit/pagekit

Protected Properties

Property Type Description
$types array
$version string

Public Methods

Method Description
create ( string $name, mixed $source, mixed $dependencies = [], mixed $options = [] ) : Pagekit\View\Asset\AssetInterface Create an asset instance.
getVersion ( ) Returns version number for cache breaking.
register ( string $name, string $class ) : self Registers an asset type.
setVersion ( $version ) Set a version number for cache breaking.

Method Details

create() public method

Create an asset instance.
public create ( string $name, mixed $source, mixed $dependencies = [], mixed $options = [] ) : Pagekit\View\Asset\AssetInterface
$name string
$source mixed
$dependencies mixed
$options mixed
return Pagekit\View\Asset\AssetInterface

getVersion() public method

Returns version number for cache breaking.
public getVersion ( )

register() public method

Registers an asset type.
public register ( string $name, string $class ) : self
$name string
$class string
return self

setVersion() public method

Set a version number for cache breaking.
public setVersion ( $version )
$version

Property Details

$types protected property

protected array $types
return array

$version protected property

protected string $version
return string