PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
← All changes | backend/src/Config/repository.php +67 -21 0.1.2 → 1.5 View file →
@@ -3,38 +3,84 @@
3 3 if (! defined('ABSPATH')) {
4 4 exit; // Exit if accessed directly
5 5 }
6 6
7 -use DI\Container;
7 +use IvyForms\Repository\FieldOptions\FieldOptionsRepository;
8 +use IvyForms\Repository\FieldOptions\FieldOptionsRepositoryInterface;
9 +use IvyForms\Repository\Form\FormRepository;
10 +use IvyForms\Repository\Form\FormRepositoryInterface;
8 11 use IvyForms\Repository\Field\FieldRepository;
9 12 use IvyForms\Repository\Field\FieldRepositoryInterface;
10 -use IvyForms\Repository\Form\FormRepository;
11 -use IvyForms\Repository\Form\FormRepositoryInterface;
12 13 use IvyForms\Repository\Notification\NotificationRepository;
13 14 use IvyForms\Repository\Notification\NotificationRepositoryInterface;
14 15 use IvyForms\Repository\Confirmation\ConfirmationRepository;
15 16 use IvyForms\Repository\Confirmation\ConfirmationRepositoryInterface;
17 +use IvyForms\Repository\Entry\EntryRepository;
18 +use IvyForms\Repository\Entry\EntryRepositoryInterface;
19 +use IvyForms\Repository\EntryField\EntryFieldNameEmailRepository;
20 +use IvyForms\Repository\EntryField\EntryFieldNameEmailRepositoryInterface;
21 +use IvyForms\Repository\EntryField\EntryFieldRepository;
22 +use IvyForms\Repository\EntryField\EntryFieldRepositoryInterface;
23 +use IvyForms\Repository\GoogleSheets\GoogleSheetsRepository;
24 +use IvyForms\Repository\GoogleSheets\GoogleSheetsRepositoryInterface;
25 +use IvyForms\Repository\Payment\OrderRepository;
26 +use IvyForms\Repository\Payment\OrderRepositoryInterface;
27 +use IvyForms\Repository\Payment\PaymentRepository;
28 +use IvyForms\Repository\Payment\PaymentRepositoryInterface;
29 +
30 +use IvyForms\Services\InstallActions\DB\FieldOptions\FieldOptionsTable;
31 +use IvyForms\Services\InstallActions\DB\GoogleSheets\GoogleSheetsTable;
32 +use IvyForms\Services\InstallActions\DB\Form\FormsTable;
16 33 use IvyForms\Services\InstallActions\DB\Field\FieldsTable;
17 -use IvyForms\Services\InstallActions\DB\Form\FormsTable;
18 34 use IvyForms\Services\InstallActions\DB\Notification\NotificationsTable;
19 35 use IvyForms\Services\InstallActions\DB\Confirmation\ConfirmationsTable;
36 +use IvyForms\Services\InstallActions\DB\Entry\EntriesTable;
37 +use IvyForms\Services\InstallActions\DB\EntryField\EntryFieldsTable;
38 +use IvyForms\Services\InstallActions\DB\Payment\OrdersTable;
39 +use IvyForms\Services\InstallActions\DB\Payment\PaymentsTable;
20 40
21 -/** @var Container $container */
22 -// @phpstan-ignore-next-line
23 -$container->set(FormRepositoryInterface::class, static function () {
24 - return new FormRepository(FormsTable::getTableName());
25 -});
41 +return [
26 42
27 -// @phpstan-ignore class.notFound
28 -$container->set(FieldRepositoryInterface::class, static function () {
29 - return new FieldRepository(FieldsTable::getTableName());
30 -});
43 + FormRepositoryInterface::class => function () {
44 + return new FormRepository(FormsTable::getTableName());
45 + },
31 46
32 -// @phpstan-ignore class.notFound
33 -$container->set(NotificationRepositoryInterface::class, static function () {
34 - return new NotificationRepository(NotificationsTable::getTableName());
35 -});
47 + FieldRepositoryInterface::class => function () {
48 + return new FieldRepository(FieldsTable::getTableName());
49 + },
36 50
37 -// @phpstan-ignore class.notFound
38 -$container->set(ConfirmationRepositoryInterface::class, static function () {
39 - return new ConfirmationRepository(ConfirmationsTable::getTableName());
40 -});
51 + NotificationRepositoryInterface::class => function () {
52 + return new NotificationRepository(NotificationsTable::getTableName());
53 + },
54 +
55 + ConfirmationRepositoryInterface::class => function () {
56 + return new ConfirmationRepository(ConfirmationsTable::getTableName());
57 + },
58 +
59 + EntryRepositoryInterface::class => function () {
60 + return new EntryRepository(EntriesTable::getTableName());
61 + },
62 +
63 + EntryFieldRepositoryInterface::class => function () {
64 + return new EntryFieldRepository(EntryFieldsTable::getTableName());
65 + },
66 +
67 + EntryFieldNameEmailRepositoryInterface::class => function () {
68 + return new EntryFieldNameEmailRepository(EntryFieldsTable::getTableName());
69 + },
70 +
71 + FieldOptionsRepositoryInterface::class => function () {
72 + return new FieldOptionsRepository(FieldOptionsTable::getTableName());
73 + },
74 +
75 + GoogleSheetsRepositoryInterface::class => function () {
76 + return new GoogleSheetsRepository(GoogleSheetsTable::getTableName());
77 + },
78 +
79 + PaymentRepositoryInterface::class => function () {
80 + return new PaymentRepository(PaymentsTable::getTableName());
81 + },
82 +
83 + OrderRepositoryInterface::class => function () {
84 + return new OrderRepository(OrdersTable::getTableName());
85 + },
86 +];