PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / trunk
Hostinger Reach – AI-Powered Email Marketing for WordPress vtrunk
1.7.2 1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / src / Providers / DatabaseProvider.php
hostinger-reach / src / Providers Last commit date
AmplitudeProvider.php 3 months ago AssetsProvider.php 1 year ago BlocksProvider.php 4 months ago ClientProvider.php 3 months ago ContainerProvider.php 1 year ago DatabaseProvider.php 10 months ago HostingRoutesProvider.php 3 months ago IntegrationsProvider.php 1 hour ago JobsProvider.php 8 months ago MenusProvider.php 1 year ago NoticesProvider.php 5 months ago ProviderInterface.php 1 year ago RedirectsProvider.php 1 year ago RoutesProvider.php 10 months ago SurveysProvider.php 3 months ago TrackingProvider.php 1 month ago WebhooksProvider.php 9 months ago WpdbProvider.php 1 year ago
DatabaseProvider.php
42 lines
1 <?php
2
3 namespace Hostinger\Reach\Providers;
4
5 use Hostinger\Reach\Admin\Database\CartsTable;
6 use Hostinger\Reach\Admin\Database\ContactListsTable;
7 use Hostinger\Reach\Admin\Database\FormsTable;
8 use Hostinger\Reach\Container;
9 use Hostinger\Reach\Setup\Database;
10 use wpdb;
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 die;
14 }
15
16 class DatabaseProvider implements ProviderInterface {
17 public const TABLES = array(
18 FormsTable::class,
19 ContactListsTable::class,
20 CartsTable::class,
21 );
22
23 public function register( Container $container ): void {
24
25 $tables = array();
26
27 foreach ( self::TABLES as $table ) {
28 $tables[] = new $table( $container->get( wpdb::class ) );
29 }
30
31 $container->set(
32 Database::class,
33 function () use ( $container, $tables ) {
34 return new Database( $tables );
35 }
36 );
37
38 $assets = $container->get( Database::class );
39 $assets->init();
40 }
41 }
42