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

Commit f52dcb8

Browse files
author
root
committed
Zend\Http\Client first prototype + testcase
2 parents 9048c2d + 126ccb2 commit f52dcb8

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/Message.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@
66

77
class Message implements MessageDescription
88
{
9+
/**
10+
* @var array
11+
*/
912
protected $metadata = array();
10-
protected $content;
13+
14+
/**
15+
* @var string
16+
*/
17+
protected $content = '';
1118

1219
/**
1320
* Set message metadata
@@ -83,7 +90,7 @@ public function getContent()
8390
return $this->content;
8491
}
8592

86-
public function __toString()
93+
public function toString()
8794
{
8895
$request = '';
8996
foreach ($this->getMetadata() as $key => $value) {
@@ -97,8 +104,4 @@ public function __toString()
97104
return $request;
98105
}
99106

100-
public function fromString($string)
101-
{
102-
throw new Exception\DomainException('Unimplemented: ' . __METHOD__);
103-
}
104107
}

src/MessageDescription.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ public function getMetadata($key = null);
99

1010
public function setContent($content);
1111
public function getContent();
12-
13-
public function __toString();
14-
public function fromString($string);
12+
1513
}

0 commit comments

Comments
 (0)