PluginProbe
The Innovative Form Builder – IvyForms / 0.2
The Innovative Form Builder – IvyForms v0.2
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.2, at backend/src/Config/repository.php

41 lines 1.5 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\Field\FieldRepository;
9 use IvyForms\Repository\Field\FieldRepositoryInterface;
10 use IvyForms\Repository\Form\FormRepository;
11 use IvyForms\Repository\Form\FormRepositoryInterface;
12 use IvyForms\Repository\Notification\NotificationRepository;
13 use IvyForms\Repository\Notification\NotificationRepositoryInterface;
14 use IvyForms\Repository\Confirmation\ConfirmationRepository;
15 use IvyForms\Repository\Confirmation\ConfirmationRepositoryInterface;
16 use IvyForms\Services\InstallActions\DB\Field\FieldsTable;
17 use IvyForms\Services\InstallActions\DB\Form\FormsTable;
18 use IvyForms\Services\InstallActions\DB\Notification\NotificationsTable;
19 use IvyForms\Services\InstallActions\DB\Confirmation\ConfirmationsTable;
20
21 /** @var Container $container */
22 // @phpstan-ignore-next-line
23 $container->set(FormRepositoryInterface::class, static function () {
24 return new FormRepository(FormsTable::getTableName());
25 });
26
27 // @phpstan-ignore class.notFound
28 $container->set(FieldRepositoryInterface::class, static function () {
29 return new FieldRepository(FieldsTable::getTableName());
30 });
31
32 // @phpstan-ignore class.notFound
33 $container->set(NotificationRepositoryInterface::class, static function () {
34 return new NotificationRepository(NotificationsTable::getTableName());
35 });
36
37 // @phpstan-ignore class.notFound
38 $container->set(ConfirmationRepositoryInterface::class, static function () {
39 return new ConfirmationRepository(ConfirmationsTable::getTableName());
40 });
41