Get the writers based on their keys

@param string|array $keys

@return array
772041
protected function getWriters($keys)
    {
        $writers = array_flip(Helper::toArray($keys));

        return Helper::flatten(array_intersect_key($this->writers, $writers));
    }
296917
public function only($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $results = [];
        foreach ($keys as $key) {
            $results = array_merge_recursive($results, $this->buildArray(explode('.', $key), $this->get($key)));
        }

        return $results;
    }
999026
protected function _keys($keys) {
		if (!$keys) {
			return [];
		}
		$config = $this->_config;
		$hasType = ($config['type'] === 'hasOne' || $config['type'] === 'hasMany');
		$related = Libraries::locate('models', $config[$hasType ? 'from' : 'to']);

		if (!class_exists($related)) {
			throw new ClassNotFoundException("Related model class '{$related}' not found.");
		}
		if (!$related::key()) {
			throw new ConfigException("No key defined for related model `{$related}`.");
		}
		$keys = (array) $keys;
		$related = (array) $related::key();

		if (count($keys) !== count($related)) {
			$msg = "Unmatched keys in relationship `{$config['name']}` between models ";
			$msg .= "`{$config['from']}` and `{$config['to']}`.";
			throw new ConfigException($msg);
		}
		return $hasType ? array_combine($related, $keys) : array_combine($keys, $related);
	}
1136634
public function mget($keys){
		$this->queries_mget_count++;
		$r=array();
		foreach($keys as $key){
			$r[$key]=$this->get($key);
			}
		return $r;
		}
711325
function getFromKeys(array $keys)
    {
        $result = [];
        try {
            foreach ($keys as $key)
            {
                $result[] = $this->get($key);
            }
        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }
    }
1261858
public function getTagsMultiple(array $keys): array
    {
        if (!is_iterable($keys)) {
            throw new CacheException('Argument $keys is not iterable.');
        }
        if (!count($keys)) {
            return [];
        }
        $keys = array_unique($keys);
        $this->validateKeys($keys);
        $return = $this->client->evalsha(
            $this->scripts[self::SCRIPT_GET_TAGS],
            count($keys),
            ...$keys,
            ...[
                self::PREFIX_KEY_VALUE,
                self::PREFIX_KEY_TAGS,
            ]
        );
        return array_map(function ($value) {
            return $value === 0 ? null : $value;
        }, array_combine($keys, $return));
    }
1362696
public function many(array $keys)
    {
        $normalizedKeys = [];

        foreach ($keys as $key => $value) {
            $normalizedKeys[] = is_string($key) ? $key : $value;
        }

        $values = $this->store->many($normalizedKeys);

        foreach ($values as $key => &$value) {
            if (is_null($value) || $value === false) {
                $this->fireCacheEvent('missed', [$key]);

                $value = isset($keys[$key]) ? value($keys[$key]) : null;
            } else {
                $this->fireCacheEvent('hit', [$key, $value]);
            }
        }

        return $values;
    }
1098167
public function getAttributeArray( $keys ) {

		$data = [];

		foreach( $keys as $key ) {

			$data[ $key ] = $this->$key;
		}

		return $data;
	}
984685
public static function getItems($array, $keys = null)
    {
        if (is_null($keys)) {
            return $array;
        } elseif (is_scalar($keys)) {
            $keys = [$keys => $array[$keys]];
        }
        $res = [];
        foreach ($keys as $k) {
            if (array_key_exists($k, $array)) {
                $res[$k] = $array[$k];
            }
        }
        return $res;
    }
708334
protected function acquire($keys)
    {
        $keys = (array) $keys;

        $values = array();
        foreach ($keys as $key) {
            $values["scrapbook.lock.$key"] = null;
        }

        // there's no point in locking longer than max allowed execution time
        // for this script
        $ttl = ini_get('max_execution_time');

        // lock these keys, then compile a list of successfully locked keys
        // (using the returned failure array)
        $result = (array) $this->apcu_add($values, null, $ttl);
        $failed = array();
        foreach ($result as $key => $err) {
            $failed[] = substr($key, strlen('scrapbook.lock.'));
        }

        return array_diff($keys, $failed);
    }
1157789
protected function getParameters(array $keys)
    {
        $parameters = [];

        foreach ($keys as $parameterKey => $default) {
            $parameters[$parameterKey] = $this->get($parameterKey, $default);
        }

        return $parameters;
    }
1093076
public function many(array $keys)
    {
        $return = [];

        $prefixedKeys = array_map(function ($key) {
            return $this->prefix . $key;
        }, $keys);

        $values = $this->connection()->mGet($prefixedKeys);

        foreach ($values as $index => $value) {
            $return[$keys[$index]] = is_numeric($value) ? $value : unserialize($value);
        }

        return $return;
    }
1263243
public function getMany(array $keys)
    {
        $values = $this->connection()->mget($this->prefixKeys($keys));

        return array_combine($keys, array_map(function ($value) {
            return is_numeric($value) ? $value : unserialize($value);
        }, $values));
    }
1008654
public final function getItems(array $keys = [])
   {
       try {
           $item = [];
           foreach ($keys as $value) {
               $item[$value] = $this->getItem($value);
           }
       } catch (InvalidArgumentException $e) {
           throw $e;
       }
       return $item;
       
   }
538895
public function getTextFromArray(array $keys = [])
    {
        $values = [];
        foreach ($keys as $key) {
            $values[$key] = $this->getText($key);
        }
        return $values;
    }
366306
public function only($keys)
    {
        $results = [];

        $input = $this->all();

        $placeholder = new stdClass;

        foreach (is_array($keys) ? $keys : func_get_args() as $key) {
            $value = data_get($input, $key, $placeholder);

            if ($value !== $placeholder) {
                Arr::set($results, $key, $value);
            }
        }

        return $results;
    }
745007
protected function getAnyKey(array $keys)
    {
        foreach($keys as $key)
        {
            $value = $this->getValue($key);

            if(!is_null($value))
            {
                return $value;
            }
        }
    }