public function Header::toArray

Get all of the header values as a flat array

Overrides ToArrayInterface::toArray

5 calls to Header::toArray()
Header::count in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Header.php
Returns the total number of header values
Header::getIterator in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Header.php
Get an iterator that can be used to easily iterate over each header value
Header::hasValue in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Header.php
Check if the collection of headers has a particular value
Header::normalize in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Header.php
Normalize the header into a single standard header with an array of values
Header::__toString in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Header.php
Convert the header to a string

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Header.php, line 197

Class

Header
Represents a header and all of the values stored by that header

Namespace

Guzzle\Http\Message

Code

public function toArray() {
  if (!$this->arrayCache) {
    $this->arrayCache = array();
    foreach ($this->values as $values) {
      foreach ($values as $value) {
        $this->arrayCache[] = $value;
      }
    }
  }
  return $this->arrayCache;
}