PHP Class AssetManager\Service\AssetManager

显示文件 Open project: rwoverdijk/assetmanager Class Usage Examples

Protected Properties

Property Type Description
$asset The asset
$assetSetOnResponse Whether this instance has at least one asset successfully set on response
$cacheManager The AssetCacheManager service.
$config The asset_manager configuration
$filterManager The AssetFilterManager service.
$path The requested path
$resolver AssetManager\Resolver\ResolverInterface

Public Methods

Method Description
__construct ( AssetManager\Resolver\ResolverInterface $resolver, array $config = [] ) : AssetManager Constructor
assetSetOnResponse ( ) : boolean Returns true if this instance of asset manager has at least one asset successfully set on response
getAssetCacheManager ( ) : AssetCacheManager Get the AssetCacheManager
getAssetFilterManager ( ) : AssetManager\Service\AssetFilterManager Get the AssetFilterManager
getResolver ( ) : AssetManager\Resolver\ResolverInterface Get the resolver used by the asset manager
resolvesToAsset ( Zend\Stdlib\RequestInterface $request ) : boolean Check if the request resolves to an asset.
setAssetCacheManager ( AssetCacheManager $cacheManager ) Set the AssetCacheManager.
setAssetFilterManager ( AssetManager\Service\AssetFilterManager $filterManager ) Set the AssetFilterManager.
setAssetOnResponse ( Zend\Stdlib\ResponseInterface $response ) : Zend\Stdlib\ResponseInterface Set the asset on the response, including headers and content.
setResolver ( AssetManager\Resolver\ResolverInterface $resolver ) Set the resolver to use in the asset manager

Protected Methods

Method Description
resolve ( Zend\Stdlib\RequestInterface $request ) : mixed Resolve the request to a file.
setConfig ( array $config ) Set the config

Method Details

__construct() public method

Constructor
public __construct ( AssetManager\Resolver\ResolverInterface $resolver, array $config = [] ) : AssetManager
$resolver AssetManager\Resolver\ResolverInterface
$config array
return AssetManager

assetSetOnResponse() public method

Returns true if this instance of asset manager has at least one asset successfully set on response
public assetSetOnResponse ( ) : boolean
return boolean

getAssetCacheManager() public method

Get the AssetCacheManager
public getAssetCacheManager ( ) : AssetCacheManager
return AssetCacheManager

getAssetFilterManager() public method

Get the AssetFilterManager
public getAssetFilterManager ( ) : AssetManager\Service\AssetFilterManager
return AssetManager\Service\AssetFilterManager

getResolver() public method

Get the resolver used by the asset manager
public getResolver ( ) : AssetManager\Resolver\ResolverInterface
return AssetManager\Resolver\ResolverInterface

resolve() protected method

Resolve the request to a file.
protected resolve ( Zend\Stdlib\RequestInterface $request ) : mixed
$request Zend\Stdlib\RequestInterface
return mixed false when not found, AssetInterface when resolved.

resolvesToAsset() public method

Check if the request resolves to an asset.
public resolvesToAsset ( Zend\Stdlib\RequestInterface $request ) : boolean
$request Zend\Stdlib\RequestInterface
return boolean

setAssetCacheManager() public method

Set the AssetCacheManager.
public setAssetCacheManager ( AssetCacheManager $cacheManager )
$cacheManager AssetCacheManager

setAssetFilterManager() public method

Set the AssetFilterManager.
public setAssetFilterManager ( AssetManager\Service\AssetFilterManager $filterManager )
$filterManager AssetManager\Service\AssetFilterManager

setAssetOnResponse() public method

Set the asset on the response, including headers and content.
public setAssetOnResponse ( Zend\Stdlib\ResponseInterface $response ) : Zend\Stdlib\ResponseInterface
$response Zend\Stdlib\ResponseInterface
return Zend\Stdlib\ResponseInterface

setConfig() protected method

Set the config
protected setConfig ( array $config )
$config array

setResolver() public method

Set the resolver to use in the asset manager
public setResolver ( AssetManager\Resolver\ResolverInterface $resolver )
$resolver AssetManager\Resolver\ResolverInterface

Property Details

$asset protected_oe property

The asset
protected $asset

$assetSetOnResponse protected_oe property

Whether this instance has at least one asset successfully set on response
protected $assetSetOnResponse

$cacheManager protected_oe property

The AssetCacheManager service.
protected $cacheManager

$config protected_oe property

The asset_manager configuration
protected $config

$filterManager protected_oe property

The AssetFilterManager service.
protected $filterManager

$path protected_oe property

The requested path
protected $path

$resolver protected_oe property

protected ResolverInterface,AssetManager\Resolver $resolver
return AssetManager\Resolver\ResolverInterface