From 126ccb26dae169691707ceade13e8a71eaee8755 Mon Sep 17 00:00:00 2001 From: Ralph Schindler Date: Mon, 8 Aug 2011 09:02:29 -0500 Subject: [PATCH] Various changes to Zend\Http * Addition of concrete header objects * Altered Headers, RequestHeaders and ResponseHeaders to handle concrete header objects of specific types --- src/Message.php | 15 +++++++++------ src/MessageDescription.php | 4 +--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Message.php b/src/Message.php index 871782581..077c498f8 100644 --- a/src/Message.php +++ b/src/Message.php @@ -6,8 +6,15 @@ class Message implements MessageDescription { + /** + * @var array + */ protected $metadata = array(); - protected $content; + + /** + * @var string + */ + protected $content = ''; /** * Set message metadata @@ -83,7 +90,7 @@ public function getContent() return $this->content; } - public function __toString() + public function toString() { $request = ''; foreach ($this->getMetadata() as $key => $value) { @@ -97,8 +104,4 @@ public function __toString() return $request; } - public function fromString($string) - { - throw new Exception\DomainException('Unimplemented: ' . __METHOD__); - } } diff --git a/src/MessageDescription.php b/src/MessageDescription.php index 89791b2b2..a81ffc98c 100644 --- a/src/MessageDescription.php +++ b/src/MessageDescription.php @@ -9,7 +9,5 @@ public function getMetadata($key = null); public function setContent($content); public function getContent(); - - public function __toString(); - public function fromString($string); + }