value = $value; } public function getFieldName() { return 'Received'; } public function getFieldValue($format = HeaderInterface::FORMAT_RAW) { return $this->value; } public function setEncoding($encoding) { // This header must be always in US-ASCII return $this; } public function getEncoding() { return 'ASCII'; } public function toString() { return 'Received: ' . $this->getFieldValue(); } /** * Serialize collection of Received headers to string * * @param array $headers * @throws Exception\RuntimeException * @return string */ public function toStringMultipleHeaders(array $headers) { $strings = array($this->toString()); foreach ($headers as $header) { if (!$header instanceof Received) { throw new Exception\RuntimeException( 'The Received multiple header implementation can only accept an array of Received headers' ); } $strings[] = $header->toString(); } return implode(Headers::EOL, $strings); } }