Introduce ContainerWrapper
Container wrapper wraps both premium and free containers and adds ability for free plugin to use premium plugin services directly. [PREMIUM-99]
This commit is contained in:
@ -2,9 +2,9 @@
|
||||
|
||||
namespace MailPoet\API;
|
||||
|
||||
use MailPoet\DI\ContainerWrapper;
|
||||
use MailPoetVendor\Psr\Container\ContainerInterface;
|
||||
use MailPoetVendor\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
use MailPoet\DI\ContainerFactory;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
@ -37,8 +37,7 @@ class API {
|
||||
*/
|
||||
private static function ensureContainerIsLoaded() {
|
||||
if(!self::$container) {
|
||||
$factory = new ContainerFactory();
|
||||
self::$container = $factory->getContainer();
|
||||
self::$container = ContainerWrapper::getInstance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user