| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\Framework\Http; |
| 4 |
|
| 5 |
use Give\Framework\Http\ConnectServer\Client\ConnectClient; |
| 6 |
use Give\ServiceProviders\ServiceProvider as ServiceProviderInterface; |
| 7 |
|
| 8 |
/** |
| 9 |
* @since 2.25.0 |
| 10 |
*/ |
| 11 |
class ServiceProvider implements ServiceProviderInterface |
| 12 |
{ |
| 13 |
|
| 14 |
/** |
| 15 |
* @inheritDoc |
| 16 |
* @since 2.25.0 |
| 17 |
*/ |
| 18 |
public function register() |
| 19 |
{ |
| 20 |
give()->singleton(ConnectClient::class, static function () { |
| 21 |
$giveConnectUrl = (defined('GIVE_CONNECT_URL') && GIVE_CONNECT_URL) |
| 22 |
? GIVE_CONNECT_URL |
| 23 |
: 'https://connect.givewp.com'; |
| 24 |
|
| 25 |
return new ConnectClient($giveConnectUrl); |
| 26 |
}); |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* @inheritDoc |
| 31 |
* @since 2.25.0 |
| 32 |
*/ |
| 33 |
public function boot() |
| 34 |
{ |
| 35 |
} |
| 36 |
} |
| 37 |
|