-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a2b6ec
commit 76c5d99
Showing
5 changed files
with
51 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/* | ||
* This file is part of GBCLStudio Project. | ||
* | ||
* Copyright (c) 2023 GBCLStudio PHP Project Team. | ||
* | ||
* For the full copyright and license information, please view the LICENSE.md | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace GBCLStudio\GeoIp\Api\Service; | ||
|
||
use Flarum\Settings\SettingsRepositoryInterface; | ||
use GuzzleHttp\Client; | ||
|
||
abstract class BaseService | ||
{ | ||
protected Client $client; | ||
|
||
public function __construct(protected SettingsRepositoryInterface $settings) | ||
{ | ||
$this->client = new Client([ | ||
'base_uri' => $this->setBaseRequestUrl() | ||
]); | ||
} | ||
|
||
/** Returns the base request url (including HTTP scheme) | ||
* | ||
* @return string | ||
*/ | ||
abstract public function setBaseRequestUrl(): string; | ||
} |
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