AmplitudeProvider.php
2 months ago
AssetsProvider.php
11 months ago
BlocksProvider.php
3 months ago
ClientProvider.php
2 months ago
ContainerProvider.php
11 months ago
DatabaseProvider.php
8 months ago
HostingRoutesProvider.php
2 months ago
IntegrationsProvider.php
5 months ago
JobsProvider.php
7 months ago
MenusProvider.php
11 months ago
NoticesProvider.php
4 months ago
ProviderInterface.php
11 months ago
RedirectsProvider.php
11 months ago
RoutesProvider.php
9 months ago
SurveysProvider.php
2 months ago
TrackingProvider.php
8 months ago
WebhooksProvider.php
8 months ago
WpdbProvider.php
11 months ago
AmplitudeProvider.php
31 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Hostinger\Reach\Providers; |
| 4 | |
| 5 | use Hostinger\Amplitude\AmplitudeManager; |
| 6 | use Hostinger\Reach\Amplitude\Amplitude; |
| 7 | use Hostinger\Reach\Container; |
| 8 | use Hostinger\WpHelper\Requests\Client; |
| 9 | use Hostinger\WpHelper\Config; |
| 10 | use Hostinger\WpHelper\Utils as Helper; |
| 11 | |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | die; |
| 15 | } |
| 16 | |
| 17 | class AmplitudeProvider implements ProviderInterface { |
| 18 | public function register( Container $container ): void { |
| 19 | $container->set( |
| 20 | Amplitude::class, |
| 21 | function () use ( $container ) { |
| 22 | return new AmplitudeManager( |
| 23 | $container->get( Helper::class ), |
| 24 | $container->get( Config::class ), |
| 25 | $container->get( Client::class ), |
| 26 | ); |
| 27 | } |
| 28 | ); |
| 29 | } |
| 30 | } |
| 31 |