function public static function CdnAsset::isFileValid

8.x-3.x CdnAsset.php public static CdnAsset::isFileValid($url)

Indicates whether the provided URL is valid.

Parameters

string $url: The URL to check.

Return value

bool TRUE or FALSE

Class

CdnAsset
Class CdnAsset.

Namespace

Drupal\bootstrap\Plugin\Provider

Source src/Plugin/Provider/CdnAsset.php (line 244)

public static function isFileValid($url) {
  if (preg_match(static::INVALID_FILE_REGEXP, $url)) {
    return FALSE;
  }
  list($path, $example, $minified, $type) = static::extractParts($url);
  return $path && $type;
}