function LibraryDiscoveryParser::isValidUri

Same name in other branches
  1. 9 core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php \Drupal\Core\Asset\LibraryDiscoveryParser::isValidUri()
  2. 8.9.x core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php \Drupal\Core\Asset\LibraryDiscoveryParser::isValidUri()
  3. 11.x 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 586

Class

LibraryDiscoveryParser
Parses library files to get extension data.

Namespace

Drupal\Core\Asset

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.