-
Notifications
You must be signed in to change notification settings - Fork 46
Add StreamFactoryDiscovery #18
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
Conversation
Supports Guzzle and Zend Diactoros.
/** | ||
* Zend Diactoros StreamFactory | ||
* | ||
* @author GeLo <[email protected]> |
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.
Remove Eric please.
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.
But it's code written by him. I just copied it from MessageFactory.
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.
Actually, it is written by me. Back then I added Eric to each files he had any connection with, but that class is 90% rewritten by me. Even if it is copied partly, please add only yourself.
You might also add a comment that the code is copied from message factory. Actually, the ultimate solution would be somehow share the code between the two classes. But let's think about it later.
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.
OK
Nice job @mekras |
I think message factory should have an injected stream factory to create stream (actually it create stream from a protected method) |
I also thought about that. But it would complicate using the MessageFactory. Actually, we could even instantiate the stream factory or use the StreamDiscovery in MessageFactory. Since the MessageFactory uses the exact same code, hard coupling is probably not a problem here. |
Add StreamFactory and Discovery
Supports Guzzle and Zend Diactoros.