-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
and remove the evil LocalizedEndpointProxy
- Loading branch information
Showing
7 changed files
with
54 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace GW2Treasures\GW2Api\V2\Localization; | ||
|
||
use GuzzleHttp\Message\RequestInterface; | ||
use GW2Treasures\GW2Api\V2\ApiHandler; | ||
|
||
class LocalizationHandler extends ApiHandler { | ||
function __construct( ILocalizedEndpoint $endpoint ) { | ||
$this->endpoint = $endpoint; | ||
} | ||
|
||
/** | ||
* @return ILocalizedEndpoint | ||
*/ | ||
protected function getEndpoint() { | ||
return parent::getEndpoint(); | ||
} | ||
|
||
/** | ||
* @param RequestInterface $request | ||
*/ | ||
public function onRequest( RequestInterface $request ) { | ||
$request->getQuery()->add( 'lang', $this->getEndpoint()->getLang() ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters