-
Notifications
You must be signed in to change notification settings - Fork 11
Added support for multipart stream created from uri streams #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
9dffb33
edb3165
ec9a031
b303f78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,14 @@ public function build() | |
$this->getHeaders($data['headers'])."\r\n"; | ||
|
||
// Convert the stream to string | ||
$streams .= (string) $data['contents']; | ||
/* @var $contentStream StreamInterface */ | ||
$contentStream = $data['contents']; | ||
if ($contentStream->isSeekable()) { | ||
$streams .= (string) $data['contents']; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though the output it the same. I think I would like to change this line to: $streams .= $contentStream->_toString(); It will increase readability. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great to hear you plan to merge the PR next week. I agree with your comment about readability and have made the change from string casting to explicitly calling __toString(). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome. Thank you. |
||
} else { | ||
$streams .= $contentStream->getContents(); | ||
} | ||
|
||
$streams .= "\r\n"; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good