Open Data Catalog v
Drupal\datastore\Service\ResourceLocalizer Class Reference

Public Member Functions

 __construct (ResourceMapper $fileMapper, FactoryInterface $fileFetcherFactory, DrupalFiles $drupalFiles, JobStoreFactory $jobStoreFactory)
 localize ($identifier, $version=NULL)
 getResult ($identifier, $version=NULL)
 getFileFetcher (Resource $resource)
 getFileSystem ()

Public Attributes

const LOCAL_FILE_PERSPECTIVE = 'local_file'
const LOCAL_URL_PERSPECTIVE = 'local_url'

Detailed Description

Resource localizer.

Update fileMapper to resourceMapper.

Definition at line 24 of file ResourceLocalizer.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\datastore\Service\ResourceLocalizer::__construct ( ResourceMapper  $fileMapper,
FactoryInterface  $fileFetcherFactory,
DrupalFiles  $drupalFiles,
JobStoreFactory  $jobStoreFactory 


Definition at line 39 of file ResourceLocalizer.php.

Member Function Documentation

◆ getFileFetcher()

Drupal\datastore\Service\ResourceLocalizer::getFileFetcher ( Resource  $resource)

Get FileFetcher.

Definition at line 161 of file ResourceLocalizer.php.

◆ getFileSystem()

Drupal\datastore\Service\ResourceLocalizer::getFileSystem ( )

Get the Drupal filesystem service.

\Drupal\Core\File\FileSystemInterface Drupal filesystem.

Definition at line 192 of file ResourceLocalizer.php.

◆ getResult()

Drupal\datastore\Service\ResourceLocalizer::getResult (   $identifier,
  $version = NULL 

Get Result.

Definition at line 110 of file ResourceLocalizer.php.

◆ localize()

Drupal\datastore\Service\ResourceLocalizer::localize (   $identifier,
  $version = NULL 

Retriever the file and create a local copy of it.

Definition at line 49 of file ResourceLocalizer.php.

Member Data Documentation


const Drupal\datastore\Service\ResourceLocalizer::LOCAL_FILE_PERSPECTIVE = 'local_file'

Definition at line 28 of file ResourceLocalizer.php.


const Drupal\datastore\Service\ResourceLocalizer::LOCAL_URL_PERSPECTIVE = 'local_url'

Definition at line 29 of file ResourceLocalizer.php.