You are here

public function PhpFileLibrary::getLocator in Libraries API 8.3

Gets the locator of this library using the locator factory.

Because determining the installation status and library path of a library is not specific to any library or even any library type, this logic is offloaded to separate locator objects.

Parameters

\Drupal\Component\Plugin\Factory\FactoryInterface $locator_factory:

Return value

\Drupal\libraries\ExternalLibrary\Local\LocatorInterface

Overrides LocalLibraryInterface::getLocator

See also

\Drupal\libraries\ExternalLibrary\Local\LocatorInterface

File

src/ExternalLibrary/PhpFile/PhpFileLibrary.php, line 68

Class

PhpFileLibrary
Provides a base PHP file library implementation.

Namespace

Drupal\libraries\ExternalLibrary\PhpFile

Code

public function getLocator(FactoryInterface $locator_factory) {

  // @todo Consider refining the stream wrapper used here.
  return $locator_factory
    ->createInstance('uri', [
    'uri' => 'php-file://',
  ]);
}