You are here

protected function LibraryDiscoveryParser::isValidUri in Drupal 10

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

Determines if the supplied string is a valid URI.

File

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

Class

LibraryDiscoveryParser
Parses library files to get extension data.

Namespace

Drupal\Core\Asset

Code

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