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
AssetsProvider.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Hostinger\Reach\Providers; |
| 4 | |
| 5 | use Hostinger\Reach\Api\Handlers\ReachApiHandler; |
| 6 | use Hostinger\Reach\Container; |
| 7 | use Hostinger\Reach\Functions; |
| 8 | use Hostinger\Reach\Setup\Assets; |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | die; |
| 12 | } |
| 13 | |
| 14 | class AssetsProvider implements ProviderInterface { |
| 15 | public function register( Container $container ): void { |
| 16 | $container->set( |
| 17 | Assets::class, |
| 18 | function () use ( $container ) { |
| 19 | return new Assets( $container->get( Functions::class ), $container->get( ReachApiHandler::class ) ); |
| 20 | } |
| 21 | ); |
| 22 | |
| 23 | $assets = $container->get( Assets::class ); |
| 24 | $assets->init(); |
| 25 | } |
| 26 | } |
| 27 |