| @@ -1,0 +1,36 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +if (! defined('ABSPATH')) { | |
| 4 | + exit; // Exit if accessed directly | |
| 5 | +} | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * @copyright © Melograno Venture Studio. All rights reserved. | |
| 9 | + * @licence See LICENCE.md for license details. | |
| 10 | + */ | |
| 11 | + | |
| 12 | +use IvyForms\Vendor\DI\ContainerBuilder; | |
| 13 | + | |
| 14 | +$containerBuilder = new ContainerBuilder(); | |
| 15 | + | |
| 16 | +try { | |
| 17 | + $container = $containerBuilder->build(); | |
| 18 | +} catch (Exception $e) { | |
| 19 | + // Handle the exception | |
| 20 | + if (defined('WP_DEBUG') && WP_DEBUG) { | |
| 21 | + error_log('Container build failed: ' . $e->getMessage()); | |
| 22 | + } | |
| 23 | + exit('Container build failed. Please check the logs.'); | |
| 24 | +} | |
| 25 | + | |
| 26 | +/** | |
| 27 | + * Set app settings | |
| 28 | + */ | |
| 29 | +//$container->set('settings', require('settings.php')); | |
| 30 | + | |
| 31 | + | |
| 32 | +require 'repository.php'; | |
| 33 | + | |
| 34 | +require 'services.php'; | |
| 35 | + | |
| 36 | +return $container; | |