PluginProbe
MONEI Payments for WooCommerce / 7.3.3
MONEI Payments for WooCommerce v7.3.3
7.3.3 7.3.2 7.3.1 7.3.0 7.2.4 7.2.3 7.2.2 7.2.0 7.2.1 7.1.3 2.1.0 3.0.0 3.1.0 3.1.1 4.0.0 4.1.0 4.1.1 4.2.0 4.2.1 5.0 5.1.0 5.1.1 5.1.2 5.2.2 5.2.3 All 87 releases
monei / src / Core / ContainerProvider.php

ContainerProvider.php in MONEI Payments for WooCommerce 7.3.3, at src/Core/ContainerProvider.php

24 lines 527 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Monei\Core;
4
5 use DI\Container;
6 use DI\ContainerBuilder;
7
8 class ContainerProvider {
9 private static ?Container $container = null;
10
11 public static function getContainer(): Container {
12 if ( self::$container === null ) {
13 self::buildContainer();
14 }
15 return self::$container;
16 }
17
18 private static function buildContainer(): void {
19 $containerBuilder = new ContainerBuilder();
20 $containerBuilder->addDefinitions( __DIR__ . '/container-definitions.php' );
21 self::$container = $containerBuilder->build();
22 }
23 }
24