-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[BridgeXPathAbstract + BlizzardNewsBridge + XPathBridge] Add new abstract class + two example implementations #1671
Conversation
56534ff
to
b731162
Compare
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.
Nice work, @Niehztog !
Here are some comments. I will add more later
Also, you don't need to rebase and force push. You commits will be squashed after merging. |
b731162
to
782b1c0
Compare
Hello @em92 |
782b1c0
to
baa55a7
Compare
Hi, @Niehztog ! Could you please rebase your PR? In mid october I have fixed Travis CI for automatic PR checks. It stopped working in August. |
…implementations (BlizzardNewsBridge + XPathBridge)
…implementations (BlizzardNewsBridge + XPathBridge)
…implementations (BlizzardNewsBridge + XPathBridge)
…implementations (BlizzardNewsBridge + XPathBridge)
895f4a8
to
c6da4da
Compare
gj @Niehztog |
*/ | ||
protected function fixEncoding($input) | ||
{ | ||
return $this->getParam('fix_encoding') ? utf8_decode($input) : $input; |
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.
I think this should be utf8_encode()
which would convert iso-8859 to utf8. Right now it's the other way around.
As a reaction to the discussion in my original pull request, where user @somini suggested to provide an abstract bridge simplifying the creation of new bridges using xpath expressions, I developed this new proposal as a pull request.
Basically I divided the code of my original pull request into three different classes: One abstract class "BridgeXPathAbstract" and two derived classes "BlizzardNewsBridge" and "XPathBridge" demonstrating how to use it. This approach has two great advantages:
Contents:
This PR can be regarded as an alternative approach to 1645.
If desired I would be totaly okay with removing XPathBridge from the PR. I left it here for quick debugging of new xpath expressions without the need to create a new bridge class.