Get multiple header values

@param string ...$keys
@return array<string>
971121
public function getMultiple(string ...$keys): array
    {
        $ret = [];
        foreach ($keys as $key) {
            $ret[] = $this->get($key);
        }
        return $ret;
    }
1021583
public static function getHeaderValue($key = 'Content-Type', $headers = array())
	{
		$value = null;
		if (empty($headers)) {
			// no headers passed... determine from sent
			if (function_exists('headers_list')) {
				$headers = headers_list();
			} elseif (function_exists('apache_response_headers')) {
				// apache_response_headers is somewhat worthless.... must flush the output first via ob_end_flush
				$headers = apache_response_headers();
				if (!headers_sent()) {
					// $this->debug->warn('headers not yet sent.. unable to determine complete list');
					// $this->debug->log('headers', $headers);
				}
			} else {
				// $this->debug->warn('unable to determine sent headers');
			}
		}
		if ($headers) {
			if (is_string($headers)) {
				$headers = explode("\n", $headers);
			}
			$arrayUtil = new ArrayUtil();
			if ($arrayUtil->isHash($headers)) {
				if (isset($headers[$key])) {
					$value = $headers[$key];
				}
			} else {
				foreach ($headers as $header) {
					if (preg_match('/^'.$key.':\s*([^;]*)/i', $header, $matches)) {
						$value = $matches[1];
						break;
					}
				}
			}
		}
		if (is_null($value) && $key == 'Content-Type') {
			$value = ini_get('default_mimetype');
		}
		// $this->debug->log('value', $value);
		// $this->debug->groupEnd();
		return $value;
	}
55375
protected function getRegularValues($data, $key, array $keys) {
        $values = [];

        if (count($keys) === 0) {
            $values[$key] = $this->propertyReader->getProperty($data, $key);
        }

        if (count($keys) > 0) {
            $value = $this->propertyReader->getProperty($data, $key);
            $nestedValues = $this->getValues($value, $keys);

            foreach ($nestedValues as $nestedKey => $nestedValue) {
                $values[$this->buildKey($key, $nestedKey)] = $nestedValue;
            }
        }

        return $values;
    }
1229294
protected function mapHeaderKeys(array $headers)
    {
        $phpHeaders = array();
        foreach ($headers as $key => $value) {
            $phpHeaders['HTTP_' . str_replace('-', '_', strtoupper($key))] = $value;
        }

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

        return Helper::flatten(array_intersect_key($this->writers, $writers));
    }
1152324
public function getHeader($key)
    {
        return isset($this->_headers[$key]) ? $this->_headers[$key] : null;
    }
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));
    }
1190414
protected function keysToString(array $keys) {
    $head = array_shift($keys);
    if ($keys) {
      return $head . '[' . implode('][', $keys) . ']';
    }
    else {
      return $head;
    }
  }
1098167
public function getAttributeArray( $keys ) {

		$data = [];

		foreach( $keys as $key ) {

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

		return $data;
	}
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;
    }
1170853
public function post(...$keys)
    {
        if(!$keys) {
            return $this->request->values;
        }
        elseif(count($keys) === 1) {
            return $this->request->value($keys[0]);
        }

        $values = [];
        foreach($keys as $key) {
            $values[] = $this->request->value($key);
        }
        return $values;
    }
782086
public function many(array $keys)
    {
        $results = [];

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

        foreach ($values as $index => $value) {
            $results[$keys[$index]] = ! is_null($value) ? $this->unserialize($value) : null;
        }

        return $results;
    }
951989
protected function getValues($keys)
	{
		if(empty($keys))
			return array();

		$ids=implode("','",$keys);
		$time=time();
		$sql="SELECT id, value FROM {$this->cacheTableName} WHERE id IN ('$ids') AND (expire=0 OR expire>$time)";

		$db=$this->getDbConnection();
		if($db->queryCachingDuration>0)
		{
			$duration=$db->queryCachingDuration;
			$db->queryCachingDuration=0;
			$rows=$db->createCommand($sql)->queryAll();
			$db->queryCachingDuration=$duration;
		}
		else
			$rows=$db->createCommand($sql)->queryAll();

		$results=array();
		foreach($keys as $key)
			$results[$key]=false;
		foreach($rows as $row)
			$results[$row['id']]=$row['value'];
		return $results;
	}
1063663
function &get($key) {
		$key=$this->fixheader($key);
		if (isset($this->headers[$key]))
			$val=&$this->headers[$key];
		else
			$val=NULL;
		return $val;
	}
1136634
public function mget($keys){
		$this->queries_mget_count++;
		$r=array();
		foreach($keys as $key){
			$r[$key]=$this->get($key);
			}
		return $r;
		}
538895
public function getTextFromArray(array $keys = [])
    {
        $values = [];
        foreach ($keys as $key) {
            $values[$key] = $this->getText($key);
        }
        return $values;
    }
799253
public function get($key) {
        $key = $this->formatKey($key);
        return array_get($this->headers, $key, []);
    }