Retrieve an array item from the cache by key.

@param  array  $keys
@return array
345851
public function getMany(array $keys)
    {
        $cache = $this->table()->whereIn('key', $this->prefixKeys($keys))->get()->keyBy('key');

        $cached = [];
        $expired = [];
        foreach ($keys as $key) {
            $item = $cache->get($this->getPrefix().$key);

            if (time() >= data_get($item, 'expiration')) {
                if (! is_null($item)) {
                    $expired[] = $key;
                }
                $cached[$key] = null;
                continue;
            }

            $cached[$key] = $this->encrypter->decrypt(data_get($item, 'value'));
        }

        if (! empty($expired)) {
            $this->forgetMany($expired);
        }

        return $cached;
    }
763445
public function get_many($keys) {
        $return = array();
        foreach ($keys as $key) {
            if ($this->persist && array_key_exists($key, $this->store)) {
                $return[$key] = $this->store[$key];
            } else {
                $return[$key] = false;
            }
        }
        return $return;
    }
267830
function getFromKeys(array $keys)
    {
        $realm = $this->getRealm();


        foreach ($keys as $i => $k)
            $keys[$i] = "'$k'";

        $keys = implode(', ', $keys);

        try {
            $sql = "SELECT * FROM `KVStore` WHERE `realm` = '$realm' and `key` IN ($keys);";

            $stm = $this->pdo->prepare($sql);
            $stm->execute();
            $stm->setFetchMode(\PDO::FETCH_ASSOC);

            $c = $stm->fetchAll();

            foreach ($c as $d) {
                $key     = $d['key'];
                $val     = $this->getDataInterchange()->retrieveBackward( $d['value'] );

                parent::set($key, $val);
                yield $key => $val;
            }

        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }
    }
847053
protected function & getFromArray(&$array, $keys, $default = null)
    {
        $key = array_shift($keys);
        if (!isset($array[$key])) {
            return $default;
        }

        if (empty($keys)) {
            return $array[$key];
        }

        return $this->getFromArray($array[$key], $keys, $default);
    }
847343
public function mget(array $keys)
    {
        return array_map(
            function ($value) {
                return $value !== false ? $value : null;
            }, $this->client->mget($keys)
        );
    }
632204
public function hasMany(array $keys)
    {
        $values = $this->getMany($keys);

        return array_map(function ($value) {
            return ! is_null($value);
        }, $values);
    }
574694
public function toArray($keys=array()) {
        $vars = get_object_vars($this);

        $results = array();
        if (count($keys) == 0) {
            foreach($vars as $name=>$value) {
                if (is_string($value) || is_numeric($value) || is_bool($value)) {
                    $results[$name] = $value;
                }
            }

            return $results;
        }

        foreach($keys as $key) {
            if (!isset($vars[$key])) continue;
            $results[$key] = $vars[$key];
        }
        return $results;
    }
756233
protected function iteratorToArray($keys)
    {
        // Already array
        if (is_array($keys)) {
            return $keys;
        }

        // Handle iterable
        if ($keys instanceof Traversable) {
            return iterator_to_array($keys, false);
        }

        // Error
        $keysType = is_object($keys) ? get_class($keys) : gettype($keys);
        throw new InvalidArgumentException("Cache keys must be array or Traversable, \"{$keysType}\" given");
    }
1290768
protected function read(array $keys)
    {
        $_res = array();
        $res = apc_fetch($keys);
        foreach ($res as $k => $v) {
            $_res[$k] = $v;
        }

        return $_res;
    }
1350412
public function loadOld(array $keys)
    {
        $result = array();
        // Load the values from the web shop specific configuration.
        $configurationValues = $this->getSettings()->getSetting($this->configCode);
        $values = isset($configurationValues['acumulus_siel_module']) ? $configurationValues['acumulus_siel_module'] : array();
        foreach ($keys as $key) {
            if (array_key_exists($key, $values)) {
                $result[$key] = $values[$key];
            }
        }

        // Delete the value, this will only be used one more time: during
        // updating to 5.4.0.
        unset($configurationValues['acumulus_siel_module']);
        $this->getSettings()->editSetting('acumulus_siel', $configurationValues);

        return $result;
    }
573857
public static function fromKeys($keys){
        $hash = new Dictionary();
        foreach($keys as $key){
            $hash[$key] = NULL;
        }
        return $hash;
    }
882136
public static function GetElementsByKeys (array $array, array $keys) {
		return array_filter(array_combine($keys, array_map(function ($key) use ($array) {
			return isset($array[$key]) ? $array[$key] : null;
		}, $keys)));
	}
164017
protected function getItems(array $items)
	{
		$result = array();
		foreach($items as $item) {
			$result[] = $this->getItem($item);
		}
		return $result;
	}
687152
public function getMultiple($keys)
	{
		$items = array();
		$success = false;
		$values = apc_fetch($keys, $success);

		if ($success && is_array($values))
		{
			foreach ($values as $key => $value)
			{
				// @todo - identify the value when a cache item is not found.
				$items[$key] = new Item($key);
				$items[$key]->setValue($value);
			}
		}

		return $items;
	}
452012
public function delete(...$keys)
    {
        $pool = $this->cachePool();

        $results = true;
        foreach ($keys as $key) {
            $results = $pool->deleteItem($key) && $results;
        }

        return $results;
    }
299158
public function getParams(array $keys = null)
    {
        $params = $this->params;

        if ($keys) {
            $subset = [];
            foreach ($keys as $key) {
                if (array_key_exists($key, $params)) {
                    $subset[$key] = $params[$key];
                }
            }
            return $subset;
        }

        return $params;
    }
1332584
public function getMany($keys)
    {
        if (!is_array($keys))
            $keys = func_get_args();

        $newArray = array();

        foreach($keys as $key) {
            if (isset($this->_data[$key])) {
                $newArray[$key] = $this->_data[$key];
            }
        }

        return $newArray;
    }