Codesleeve\AssetPipeline\Filters\URLRewrite::url_matcher PHP Метод

url_matcher() публичный Метод

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]
Результат [type]
    public function url_matcher($matches)
    {
        list($changed, $newurl) = $this->relative_match($matches['url']);
        if ($changed) {
            return str_replace($matches['url'], $newurl, $matches[0]);
        }
        list($changed, $newurl) = $this->found_file_match($matches['url']);
        if ($changed) {
            return str_replace($matches['url'], $newurl, $matches[0]);
        }
        return $matches[0];
    }