private function AbstractMessage::parseCacheControlDirective

Parse the Cache-Control HTTP header into an array

1 call to AbstractMessage::parseCacheControlDirective()
AbstractMessage::changedHeader in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/AbstractMessage.php
Check to see if the modified headers need to reset any of the managed headers like cache-control

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/AbstractMessage.php, line 290

Class

AbstractMessage
Abstract HTTP request/response message

Namespace

Guzzle\Http\Message

Code

private function parseCacheControlDirective() {
  $this->cacheControl = array();
  $tokenized = $this
    ->getTokenizedHeader('Cache-Control', ',') ?: array();
  foreach ($tokenized as $key => $value) {
    if (is_numeric($key)) {
      $this->cacheControl[$value] = true;
    }
    else {
      $this->cacheControl[$key] = $value;
    }
  }
}