PHP Class AssetManager\View\Helper\Asset

Inheritance: extends Zend\View\Helper\AbstractHelper
ファイルを表示 Open project: rwoverdijk/assetmanager Class Usage Examples

Public Methods

Method Description
__construct ( AssetManager\Resolver\ResolverInterface $assetManagerResolver, Zend\Cache\Storage\Adapter\AbstractAdapter | null $cache, array $config )
__invoke ( string $filename ) : string Output the filepath with its unix modification time as query param

Private Methods

Method Description
appendTimestamp ( string $filename, string $queryString, integer | null $timestamp = null ) : string Append timestamp as query param to the filename
elaborateFilePath ( string $filename, string $queryString ) : string find the file and if it exists, append its unix modification time to the filename
getFilePathFromCache ( string $filename, string $queryString ) : mixed | string Use the cache to get the filePath

Method Details

__construct() public method

public __construct ( AssetManager\Resolver\ResolverInterface $assetManagerResolver, Zend\Cache\Storage\Adapter\AbstractAdapter | null $cache, array $config )
$assetManagerResolver AssetManager\Resolver\ResolverInterface
$cache Zend\Cache\Storage\Adapter\AbstractAdapter | null
$config array

__invoke() public method

Output the filepath with its unix modification time as query param
public __invoke ( string $filename ) : string
$filename string
return string