protected function DrupalCacheAdapter::updateMetadata in Flysystem 8
Same name and namespace in other branches
- 3.x src/Flysystem/Adapter/DrupalCacheAdapter.php \Drupal\flysystem\Flysystem\Adapter\DrupalCacheAdapter::updateMetadata()
- 2.0.x src/Flysystem/Adapter/DrupalCacheAdapter.php \Drupal\flysystem\Flysystem\Adapter\DrupalCacheAdapter::updateMetadata()
- 3.0.x src/Flysystem/Adapter/DrupalCacheAdapter.php \Drupal\flysystem\Flysystem\Adapter\DrupalCacheAdapter::updateMetadata()
Updates the metadata for a given path.
Parameters
string $path: The path of file file or directory.
array|false $metadata: The metadata to update.
Return value
array|false Returns the value passed in as metadata.
6 calls to DrupalCacheAdapter::updateMetadata()
- DrupalCacheAdapter::fetchMetadataKey in src/
Flysystem/ Adapter/ DrupalCacheAdapter.php - Fetches a specific key from metadata.
- DrupalCacheAdapter::setVisibility in src/
Flysystem/ Adapter/ DrupalCacheAdapter.php - DrupalCacheAdapter::update in src/
Flysystem/ Adapter/ DrupalCacheAdapter.php - DrupalCacheAdapter::updateStream in src/
Flysystem/ Adapter/ DrupalCacheAdapter.php - DrupalCacheAdapter::write in src/
Flysystem/ Adapter/ DrupalCacheAdapter.php
File
- src/
Flysystem/ Adapter/ DrupalCacheAdapter.php, line 288
Class
- DrupalCacheAdapter
- A Flysystem adapter implementing caching with Drupal's Cache API.
Namespace
Drupal\flysystem\Flysystem\AdapterCode
protected function updateMetadata($path, $metadata) {
if (!empty($metadata)) {
$item = $this->cacheItemBackend
->load($path);
$item
->updateMetadata($metadata);
$this->cacheItemBackend
->set($path, $item);
}
return $metadata;
}