symphonycms / remote_datasource

An improved datasource to fetch data from TXT, CSV, XML and JSON sources.
Other
14 stars 9 forks source link

Added support for customizing the Gateway before it makes the HTTP request #10

Closed nitriques closed 11 years ago

nitriques commented 11 years ago

I think the title says it all.

I have been modifying the RemoteDatasource class by hand for a couple of times now, so I figure that adding an empty function in the real code base should not be a deal breaker.

brendo commented 11 years ago

I like this idea, but:

nitriques commented 11 years ago

I did call it visitGateway because it's the visitor pattern, but I really do not mind!

Does the $gateway variable need to be by reference to actually persist changes?

No, it work like that, but maybe we should pass it in ref, since it's an object.

I'll send a new PR in 5 minutes. Thanks.