public function CacheItem::updateMetadata in Flysystem 2.0.x
Same name and namespace in other branches
- 8 src/Flysystem/Adapter/CacheItem.php \Drupal\flysystem\Flysystem\Adapter\CacheItem::updateMetadata()
- 3.x src/Flysystem/Adapter/CacheItem.php \Drupal\flysystem\Flysystem\Adapter\CacheItem::updateMetadata()
- 3.0.x src/Flysystem/Adapter/CacheItem.php \Drupal\flysystem\Flysystem\Adapter\CacheItem::updateMetadata()
Updates the metadata for the item.
Parameters
array $metadata: The array of metadata for the item.
File
- src/
Flysystem/ Adapter/ CacheItem.php, line 33
Class
- CacheItem
- A filesystem item stored in the Drupal cache.
Namespace
Drupal\flysystem\Flysystem\AdapterCode
public function updateMetadata(array $metadata) {
static $keys = [
'size' => TRUE,
'mimetype' => TRUE,
'visibility' => TRUE,
'timestamp' => TRUE,
'type' => TRUE,
];
$this->metadata = array_intersect_key($metadata, $keys) + $this->metadata;
}