PHP Class AsseticBundle\Service

Datei anzeigen Open project: widmogrod/zf2-assetic-module Class Usage Examples

Protected Properties

Property Type Description
$actionName string
$assetManager Assetic\AssetManager
$assetWriter Assetic\AssetWriter
$cacheBusterStrategy Assetic\Factory\Worker\WorkerInterface
$configuration Configuration
$controllerName string
$filterManager Assetic\FilterManager
$routeName string
$strategy AsseticBundle\View\StrategyInterface[]

Public Methods

Method Description
__construct ( Configuration $configuration )
build ( ) Build collection of assets.
createAssetFactory ( array $configuration ) : Assetic\Factory\AssetFactory
getActionConfig ( )
getActionName ( ) : string
getAssetManager ( )
getAssetWriter ( )
getCacheBusterStrategy ( )
getConfiguration ( ) : Configuration Gets the service configuration.
getControllerConfig ( )
getControllerName ( ) : string
getDefaultConfig ( )
getFilterManager ( )
getRendererName ( Zend\View\Renderer\RendererInterface $renderer ) : string Get renderer name from $renderer object.
getRouteName ( )
getRouterConfig ( )
getStrategyForRenderer ( Zend\View\Renderer\RendererInterface $renderer ) : AsseticBundle\View\StrategyInterface | null Get strategy to setup assets for given $renderer.
hasStrategyForRenderer ( Zend\View\Renderer\RendererInterface $renderer ) : boolean
moveRaw ( Assetic\Asset\AssetCollection $asset, string | null $targetPath, Assetic\Factory\AssetFactory $factory, boolean $disableSourcePath = false )
prepareCollection ( array $options, string $name, Assetic\Factory\AssetFactory $factory ) : void
setActionName ( string $actionName )
setAssetManager ( Assetic\AssetManager $assetManager )
setAssetWriter ( $assetWriter )
setCacheBusterStrategy ( Assetic\Factory\Worker\WorkerInterface $cacheBusterStrategy )
setControllerName ( string $controllerName )
setFilterManager ( Assetic\FilterManager $filterManager )
setRouteName ( $routeName )
setupRenderer ( Zend\View\Renderer\RendererInterface $renderer )
setupRendererFromOptions ( Zend\View\Renderer\RendererInterface $renderer, array $options )
writeAsset ( Assetic\Asset\AssetInterface $asset, Assetic\Factory\AssetFactory $factory ) Write $asset to public directory.

Protected Methods

Method Description
write ( Assetic\Asset\AssetInterface $asset, Assetic\Factory\AssetFactory $factory )

Private Methods

Method Description
cacheAsset ( Assetic\Asset\AssetInterface $asset )
initFilters ( array $filters )

Method Details

__construct() public method

public __construct ( Configuration $configuration )
$configuration Configuration

build() public method

Build collection of assets.
public build ( )

createAssetFactory() public method

public createAssetFactory ( array $configuration ) : Assetic\Factory\AssetFactory
$configuration array
return Assetic\Factory\AssetFactory

getActionConfig() public method

public getActionConfig ( )

getActionName() public method

public getActionName ( ) : string
return string

getAssetManager() public method

public getAssetManager ( )

getAssetWriter() public method

public getAssetWriter ( )

getCacheBusterStrategy() public method

getConfiguration() public method

Gets the service configuration.
public getConfiguration ( ) : Configuration
return Configuration

getControllerConfig() public method

public getControllerConfig ( )

getControllerName() public method

public getControllerName ( ) : string
return string

getDefaultConfig() public method

public getDefaultConfig ( )

getFilterManager() public method

public getFilterManager ( )

getRendererName() public method

Get renderer name from $renderer object.
public getRendererName ( Zend\View\Renderer\RendererInterface $renderer ) : string
$renderer Zend\View\Renderer\RendererInterface
return string

getRouteName() public method

public getRouteName ( )

getRouterConfig() public method

public getRouterConfig ( )

getStrategyForRenderer() public method

Get strategy to setup assets for given $renderer.
public getStrategyForRenderer ( Zend\View\Renderer\RendererInterface $renderer ) : AsseticBundle\View\StrategyInterface | null
$renderer Zend\View\Renderer\RendererInterface
return AsseticBundle\View\StrategyInterface | null

hasStrategyForRenderer() public method

public hasStrategyForRenderer ( Zend\View\Renderer\RendererInterface $renderer ) : boolean
$renderer Zend\View\Renderer\RendererInterface
return boolean

moveRaw() public method

public moveRaw ( Assetic\Asset\AssetCollection $asset, string | null $targetPath, Assetic\Factory\AssetFactory $factory, boolean $disableSourcePath = false )
$asset Assetic\Asset\AssetCollection
$targetPath string | null
$factory Assetic\Factory\AssetFactory
$disableSourcePath boolean

prepareCollection() public method

public prepareCollection ( array $options, string $name, Assetic\Factory\AssetFactory $factory ) : void
$options array
$name string
$factory Assetic\Factory\AssetFactory
return void

setActionName() public method

public setActionName ( string $actionName )
$actionName string

setAssetManager() public method

public setAssetManager ( Assetic\AssetManager $assetManager )
$assetManager Assetic\AssetManager

setAssetWriter() public method

public setAssetWriter ( $assetWriter )

setCacheBusterStrategy() public method

public setCacheBusterStrategy ( Assetic\Factory\Worker\WorkerInterface $cacheBusterStrategy )
$cacheBusterStrategy Assetic\Factory\Worker\WorkerInterface

setControllerName() public method

public setControllerName ( string $controllerName )
$controllerName string

setFilterManager() public method

public setFilterManager ( Assetic\FilterManager $filterManager )
$filterManager Assetic\FilterManager

setRouteName() public method

public setRouteName ( $routeName )

setupRenderer() public method

public setupRenderer ( Zend\View\Renderer\RendererInterface $renderer )
$renderer Zend\View\Renderer\RendererInterface

setupRendererFromOptions() public method

public setupRendererFromOptions ( Zend\View\Renderer\RendererInterface $renderer, array $options )
$renderer Zend\View\Renderer\RendererInterface
$options array

write() protected method

protected write ( Assetic\Asset\AssetInterface $asset, Assetic\Factory\AssetFactory $factory )
$asset Assetic\Asset\AssetInterface Asset to write
$factory Assetic\Factory\AssetFactory The factory this asset was generated with

writeAsset() public method

Write $asset to public directory.
public writeAsset ( Assetic\Asset\AssetInterface $asset, Assetic\Factory\AssetFactory $factory )
$asset Assetic\Asset\AssetInterface Asset to write
$factory Assetic\Factory\AssetFactory The factory this asset was generated with

Property Details

$actionName protected_oe property

protected string $actionName
return string

$assetManager protected_oe property

protected AssetManager,Assetic $assetManager
return Assetic\AssetManager

$assetWriter protected_oe property

protected AssetWriter,Assetic $assetWriter
return Assetic\AssetWriter

$cacheBusterStrategy protected_oe property

protected WorkerInterface,Assetic\Factory\Worker $cacheBusterStrategy
return Assetic\Factory\Worker\WorkerInterface

$configuration protected_oe property

protected Configuration,asseticbundle $configuration
return Configuration

$controllerName protected_oe property

protected string $controllerName
return string

$filterManager protected_oe property

protected FilterManager,Assetic $filterManager
return Assetic\FilterManager

$routeName protected_oe property

protected string $routeName
return string

$strategy protected_oe property

protected StrategyInterface[],AsseticBundle\View $strategy
return AsseticBundle\View\StrategyInterface[]