Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Zend\Http\Client first prototype + testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Aug 9, 2011
2 parents 9048c2d + 126ccb2 commit f52dcb8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 9 additions & 6 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@

class Message implements MessageDescription
{
/**
* @var array
*/
protected $metadata = array();
protected $content;

/**
* @var string
*/
protected $content = '';

/**
* Set message metadata
Expand Down Expand Up @@ -83,7 +90,7 @@ public function getContent()
return $this->content;
}

public function __toString()
public function toString()
{
$request = '';
foreach ($this->getMetadata() as $key => $value) {
Expand All @@ -97,8 +104,4 @@ public function __toString()
return $request;
}

public function fromString($string)
{
throw new Exception\DomainException('Unimplemented: ' . __METHOD__);
}
}
4 changes: 1 addition & 3 deletions src/MessageDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ public function getMetadata($key = null);

public function setContent($content);
public function getContent();

public function __toString();
public function fromString($string);

}

0 comments on commit f52dcb8

Please sign in to comment.