PluginProbe
The Innovative Form Builder – IvyForms / 0.3
The Innovative Form Builder – IvyForms v0.3
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
ivyforms / backend / src / Config / repository.php

repository.php in The Innovative Form Builder – IvyForms 0.3, at backend/src/Config/repository.php

57 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (! defined('ABSPATH')) {
4 exit; // Exit if accessed directly
5 }
6
7 use DI\Container;
8 use IvyForms\Repository\Confirmation\ConfirmationRepository;
9 use IvyForms\Repository\Confirmation\ConfirmationRepositoryInterface;
10 use IvyForms\Repository\Entry\EntryRepository;
11 use IvyForms\Repository\Entry\EntryRepositoryInterface;
12 use IvyForms\Repository\EntryField\EntryFieldRepository;
13 use IvyForms\Repository\EntryField\EntryFieldRepositoryInterface;
14 use IvyForms\Repository\Field\FieldRepository;
15 use IvyForms\Repository\Field\FieldRepositoryInterface;
16 use IvyForms\Repository\Form\FormRepository;
17 use IvyForms\Repository\Form\FormRepositoryInterface;
18 use IvyForms\Repository\Notification\NotificationRepository;
19 use IvyForms\Repository\Notification\NotificationRepositoryInterface;
20 use IvyForms\Services\InstallActions\DB\Confirmation\ConfirmationsTable;
21 use IvyForms\Services\InstallActions\DB\Entry\EntriesTable;
22 use IvyForms\Services\InstallActions\DB\EntryField\EntryFieldsTable;
23 use IvyForms\Services\InstallActions\DB\Field\FieldsTable;
24 use IvyForms\Services\InstallActions\DB\Form\FormsTable;
25 use IvyForms\Services\InstallActions\DB\Notification\NotificationsTable;
26
27 /** @var Container $container */
28 // @phpstan-ignore-next-line
29 $container->set(FormRepositoryInterface::class, static function () {
30 return new FormRepository(FormsTable::getTableName());
31 });
32
33 // @phpstan-ignore class.notFound
34 $container->set(FieldRepositoryInterface::class, static function () {
35 return new FieldRepository(FieldsTable::getTableName());
36 });
37
38 // @phpstan-ignore class.notFound
39 $container->set(NotificationRepositoryInterface::class, static function () {
40 return new NotificationRepository(NotificationsTable::getTableName());
41 });
42
43 // @phpstan-ignore class.notFound
44 $container->set(ConfirmationRepositoryInterface::class, static function () {
45 return new ConfirmationRepository(ConfirmationsTable::getTableName());
46 });
47
48 // @phpstan-ignore class.notFound
49 $container->set(EntryRepositoryInterface::class, static function () {
50 return new EntryRepository(EntriesTable::getTableName());
51 });
52
53 // @phpstan-ignore class.notFound
54 $container->set(EntryFieldRepositoryInterface::class, static function () {
55 return new EntryFieldRepository(EntryFieldsTable::getTableName());
56 });
57