PHP Class Codesleeve\AssetPipeline\Filters\URLRewrite

Inheritance: extends FilterHelper, implements Assetic\Filter\FilterInterface
Show file Open project: codesleeve/asset-pipeline

Public Methods

Method Description
__construct ( $baseurl = '', $prefix = '/assets', $paths = ['/app/assets/stylesheets/', '/provider/assets/stylesheets/', '/lib/assets/stylesheets/'] )
filterDump ( Assetic\Asset\AssetInterface $asset )
filterLoad ( Assetic\Asset\AssetInterface $asset )
found_file_match ( string $url ) : array(bool, Search for the case where we might be concatenating and so long as the url doesn't start with a '/' we will see if there is a file relative to this directory.
relative_match ( string $url ) : array(bool, Search for cases like url(.
setAssetPipeline ( $pipeline )
url_matcher ( [type] $matches ) : [type] My attempt at rewriting CSS urls. I am looking for all url tags and then I am going to try and resolve the correct absolute path from those urls. If the file actually exists then we are good, else I just leave the thing alone.

Method Details

__construct() public method

public __construct ( $baseurl = '', $prefix = '/assets', $paths = ['/app/assets/stylesheets/', '/provider/assets/stylesheets/', '/lib/assets/stylesheets/'] )

filterDump() public method

public filterDump ( Assetic\Asset\AssetInterface $asset )
$asset Assetic\Asset\AssetInterface

filterLoad() public method

public filterLoad ( Assetic\Asset\AssetInterface $asset )
$asset Assetic\Asset\AssetInterface

found_file_match() public method

Search for the case where we might be concatenating and so long as the url doesn't start with a '/' we will see if there is a file relative to this directory.
public found_file_match ( string $url ) : array(bool,
$url string
return array(bool,

relative_match() public method

./fonts/blah.eot)
public relative_match ( string $url ) : array(bool,
$url string
return array(bool,

setAssetPipeline() public method

public setAssetPipeline ( $pipeline )

url_matcher() public method

My attempt at rewriting CSS urls. I am looking for all url tags and then I am going to try and resolve the correct absolute path from those urls. If the file actually exists then we are good, else I just leave the thing alone.
public url_matcher ( [type] $matches ) : [type]
$matches [type]
return [type]