You are here

public function VersionDetectorInterface::detectVersion in Libraries API 8.3

Detects the version of a library.

@todo Provide a mechanism for version detectors to provide a reason for failing.

Parameters

\Drupal\libraries\ExternalLibrary\Version\VersionedLibraryInterface $library: The library whose version to detect.

Throws

\Drupal\libraries\ExternalLibrary\Exception\UnknownLibraryVersionException

2 methods override VersionDetectorInterface::detectVersion()
LinePatternDetector::detectVersion in src/Plugin/libraries/VersionDetector/LinePatternDetector.php
Detects the version of a library.
StaticDetector::detectVersion in src/Plugin/libraries/VersionDetector/StaticDetector.php
Detects the version of a library.

File

src/ExternalLibrary/Version/VersionDetectorInterface.php, line 23

Class

VersionDetectorInterface
Provides an interface for version detectors.

Namespace

Drupal\libraries\ExternalLibrary\Version

Code

public function detectVersion(VersionedLibraryInterface $library);