Implement proxy variables for curl_setopt (part 2)#357
Implement proxy variables for curl_setopt (part 2)#357nerzhul wants to merge 1 commit intosimplepie:masterfrom
Conversation
|
I don't think you can override constants (DEFINE creates a constant) |
|
Of course. I have kept SimplePie coding style. Maybe there is a better thing to override it |
|
I mean, how am I supposed to set the host and port? |
|
@Raydiation how can owncloud interact with this library ? I can change the constats to variables but i need to think about a variable |
|
Create a method on the class in the same file Here's where we use simplepie https://github.com/owncloud/news/blob/master/fetcher/feedfetcher.php#L82 In case you're wondering what getCore is, its a factory that allows us to mock and test the simple pie config without using the lib, see https://github.com/owncloud/appframework/blob/master/utility/simplepieapifactory.php#L51 |
|
All in all you dont want config options as constants, you want people to set them based on the news config for instance. |
|
I see,it seems very simple. |
|
Yes, the file class should get the proxy argument. But it should also be possible to set it in the main class, I think this is the line where the main class calls the file class |
Updated File.php since discussion on issue simplepie#357 (comment)
|
Please look at #359 |
This is used with #356