Updates the header value based on the parsed directives

@param array $directives Array of cache control directives
434293
protected function updateFromDirectives(array $directives)
    {
        $this->directives = $directives;
        $this->values = array();

        foreach ($directives as $key => $value) {
            $this->values[] = $value === true ? $key : "{$key}={$value}";
        }
    }
65629
public function setTables($tables) {
		foreach($tables as $key=>$value) {
			if (is_numeric($key)) {
				$this->tables[] = $value;
			}
			else {
				$this->tables[] = $key;
				$this->columns[$key] = $value;
			}
		}
		$this->cacheTables = true;
	}
1098718
private function setRequestHeaders($headers = array()) {
        foreach ($this->headers as $key => $value) {
            $headers[] = $key . ': ' . $value;
        }
        curl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);
    }
455751
public function replace(array $headers = []): void
    {
        $this->headerNames = [];
        $this->headers = [];

        $headers !== [] && $this->add($headers);

        if (!isset($this->headers['Cache-Control'])) {
            $this->set('Cache-Control', '');
        }
    }
870506
public function setHeaders(array $headers)
    {
        $cookies = $this->cookies;

        try {
            parent::setHeaders($headers);
        } catch (\Throwable $e) {
            $this->cookies = $cookies;

            throw $e;
        }
    }
482421
static function replaceHeaders(array $newHeaders): bool
    {
        if (!headers_sent()) {
            header_remove();

            foreach ($newHeaders as $header) {
                header($header);
            }

            return true;
        }

        return false;
    }
926764
function setHeaders($headers)
    {
        if ($headers instanceof iHeaders) {
            $tHeaders = array();
            foreach($headers as $h)
                $tHeaders[] = $h;
            $headers = $tHeaders;
        }

        if (! is_array($headers) )
            throw new \InvalidArgumentException;

        foreach ($headers as $label => $h) {
            if (! $h instanceof iHeader ) {
                if (is_int($label) && is_string($h))
                    // ['X-Powered-By: PHP/5.5.9-1ubuntu4.16', ]
                    // in form of headers_list()
                    $valuable = $h;
                else
                    $valuable = array($label => $h);
                        
                $h = FactoryHttpHeader::of($valuable);
            }

            $this->headers()->insert($h);
        }

        return $this;
    }
330015
public function setHeaders(array $values)
    {
        foreach ($values as $key => $value) {
            $this->setHeader($key, $value);
        }
    }
213475
public static function register(array $directives)
    {
        collect($directives)->each(function ($item, $key) {
            Blade::directive($key, $item);
        });
    }
57089
protected function unsetHeaders(Array $headers = []) {
    foreach ($headers as $property) {
      $this->client->unsetHeader($property);
    }
  }
771688
public function setHeaders(array $headers, $append = false)
    {
        if (!$append) {
            $this->headers = $headers;
        } else {
            foreach ($headers as $field => $value) {
                $this->setHeader($field, $value);
            }
        }
    }
1152849
protected function withHeaders(array $headers)
    {
        $this->headers = [];
        foreach ($headers as $key => $value) {
            $this->headers[ strtolower($key) ] = is_array($value)
                ? $value
                : [ $value ];
        }
    }
647050
public function setTemplates(array $templates) {

        if ($templates !== null && is_array($templates)) {
            $this->_userChangedTemplates = array_merge(array_keys($templates), $this->_userChangedTemplates);
        }

        $this->_setTemplatesWrapper($templates);
    }
1055677
public function appendExcludeHeaders( array $headers )
    {
        $lowerCaseHeaders = array();
        foreach ( $headers as $header )
        {
            $lowerCaseHeaders[] = strtolower( $header );
        }
        $this->excludeHeaders = array_merge( $this->excludeHeaders, $lowerCaseHeaders );
    }
1057725
public function addGlobalHeaders($headers)
    {
        if (current($headers) instanceof Header) {
            foreach ($headers as $header) {
                $this->addGlobalHeader($header);
            }
        } else {
            foreach ($headers as $key => $value) {
                $this->addGlobalHeader($key, $value);
            }
        }
    }
245463
private function parseHeaders(array $headers)
    {

        // Set the raw headers as we got from the constructor.
        $this->raw_headers = $headers;

        // flatten the headers array so that values are not arrays themselves
        // but rather simple key value pairs.
        $headers = array_map(function ($value) {

            if (! is_array($value))
                return $value;

            return implode(';', $value);
        }, $headers);

        // Set the parsed headers.
        $this->headers = $headers;

        // Check for some header values that might be interesting
        // such as the current error limit and number of pages
        // available.
        $this->hasHeader('X-Esi-Error-Limit-Remain') ?
            $this->error_limit = (int) $this->getHeader('X-Esi-Error-Limit-Remain') : null;

        $this->hasHeader('X-Pages') ? $this->pages = (int) $this->getHeader('X-Pages') : null;
    }
595798
protected function updateCacheControlHeader(): void
    {
        $parts = [];
        ksort($this->container);
        foreach ($this->container as $key => $value) {
            if (true === $value) {
                $parts[] = $key;
            } else {
                if (preg_match('#[^a-zA-Z0-9._-]#', (string)$value)) {
                    $value = '"' . $value . '"';
                }
                $parts[] = "$key=$value";
            }
        }
        if (\count($parts)) {
            $this->response->setHeader('Cache-Control', implode(', ', $parts));
        }
    }