6.0.0-alpha10
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
5/15/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#10955] Create seams for customizing settings on Horde_Http_Request objects
*
Your Email Address
*
Spam protection
Enter the letters below:
.__..__ .__.._.. . [__][__)[__] | | | | |[__)| |_|_|/\|
Comment
> The stream context options on Horde_Http_Request_Fopen and curl > options on Horde_Http_Request_Curl options are inaccessible. There > are no seams to modify them without creating a new class, > copy/pasting the oversized send() method and apply customization > within. This leads to unnecessary work the next time you try to > upgrade the underlying Horde libs. > > The quickest solution is to extract the initialization of $opts and > $curl into a protected method. This would allow deveopers to extend > the class, overwrite the method, and add or modify options before > returning the value to send() for usage. > > If publishing protected methods like this in a public project is not > desirable you could possibly create an options Builder (meaning > Builder Pattern) which could be injected. The Builder could have > methods like setProxy($host, $port), setAuth($scheme, $username, > $password), and of course a build()/make()/create() method that > returns the assembled object. The Builder could be extended by > developers to add more options at any stage of the building process.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers