Skip to content

Implement proxy variables for curl_setopt (part 2)#357

Closed
nerzhul wants to merge 1 commit intosimplepie:masterfrom
nerzhul:patch-2
Closed

Implement proxy variables for curl_setopt (part 2)#357
nerzhul wants to merge 1 commit intosimplepie:masterfrom
nerzhul:patch-2

Conversation

@nerzhul
Copy link
Copy Markdown

@nerzhul nerzhul commented Apr 4, 2014

This is used with #356

@nerzhul nerzhul changed the title Update SimplePie.php Issue complement with https://github.com/simplepie/simplepie/pull/357 Apr 4, 2014
@nerzhul nerzhul changed the title Issue complement with https://github.com/simplepie/simplepie/pull/357 Implement proxy variables for curl_setopt (part 2) Apr 4, 2014
@BernhardPosselt
Copy link
Copy Markdown
Contributor

I don't think you can override constants (DEFINE creates a constant)

@nerzhul
Copy link
Copy Markdown
Author

nerzhul commented Apr 4, 2014

Of course. I have kept SimplePie coding style. Maybe there is a better thing to override it

@BernhardPosselt
Copy link
Copy Markdown
Contributor

I mean, how am I supposed to set the host and port?

@nerzhul
Copy link
Copy Markdown
Author

nerzhul commented Apr 4, 2014

@Raydiation how can owncloud interact with this library ? I can change the constats to variables but i need to think about a variable

@BernhardPosselt
Copy link
Copy Markdown
Contributor

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

@BernhardPosselt
Copy link
Copy Markdown
Contributor

All in all you dont want config options as constants, you want people to set them based on the news config for instance.

@nerzhul
Copy link
Copy Markdown
Author

nerzhul commented Apr 5, 2014

I see,it seems very simple.
What do you think about adding proxy arguments to object SimplePie_File ?

@BernhardPosselt
Copy link
Copy Markdown
Contributor

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

https://github.com/simplepie/simplepie/blob/master/library/SimplePie.php#L1464

nerzhul pushed a commit to nerzhul/simplepie that referenced this pull request Apr 7, 2014
Updated File.php since discussion on issue simplepie#357 (comment)
@nerzhul
Copy link
Copy Markdown
Author

nerzhul commented Apr 7, 2014

Please look at #359

@nerzhul nerzhul closed this Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants