You are here

protected function Cache::createBinData in MongoDB 7

An alternate \MongoBinData constructor using default $type.

Parameters

mixed $data: The data to convert to \MongoBinData.

Return value

\Closure The alternate constructor with $type following the extension version.

1 call to Cache::createBinData()
Cache::set in mongodb_cache/mongodb_cache_plugin.php

File

mongodb_cache/mongodb_cache_plugin.php, line 131

Class

Cache
MongoDB cache implementation.

Namespace

Drupal\mongodb_cache

Code

protected function createBinData($data) {
  $creator = $this->binDataCreator;
  $result = $creator($data);
  return $result;
}