UNPKG

zents

Version:

ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.

32 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ModuleContext = void 0; const types_1 = require("../types"); class ModuleContext { constructor(databaseContainer, emailFactory, sessionFactory, securityProviders) { this.databaseContainer = databaseContainer; this.emailFactory = emailFactory; this.sessionFactory = sessionFactory; this.securityProviders = securityProviders; } getConnection() { return this.databaseContainer.get(types_1.DB_TYPE.ORM); } hasConnection() { return this.databaseContainer.has(types_1.DB_TYPE.ORM); } getRedisClient() { return this.databaseContainer.get(types_1.DB_TYPE.REDIS); } getSecurityProvider(key) { return this.securityProviders.get(key); } getSessionFactory() { return this.sessionFactory; } getEmailFactory() { return this.emailFactory; } } exports.ModuleContext = ModuleContext; //# sourceMappingURL=ModuleContext.js.map