You are here

protected function LibraryDiscoveryParser::isValidUri in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php \Drupal\Core\Asset\LibraryDiscoveryParser::isValidUri()

Determines if the supplied string is a valid URI.

2 calls to LibraryDiscoveryParser::isValidUri()
LibraryDiscoveryParser::buildByExtension in core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php
Parses and builds up all the libraries information of an extension.
LibraryDiscoveryParser::resolveThemeAssetPath in core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php
Ensures that a full path is returned for an overriding theme asset.

File

core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php, line 465

Class

LibraryDiscoveryParser
Parses library files to get extension data.

Namespace

Drupal\Core\Asset

Code

protected function isValidUri($string) {
  return count(explode('://', $string)) === 2;
}