TypeDoc all the thngs

This commit is contained in:
2021-03-25 08:50:13 -05:00
parent 7cb0546b01
commit fad1184afe
52 changed files with 976 additions and 3 deletions

View File

@@ -13,10 +13,15 @@ import {Session} from "./Session";
import {Logging} from "../../service/Logging";
import {Config} from "../../service/Config";
/**
* A dependency injection factory that matches the abstract Session class
* and produces an instance of the configured session driver implementation.
*/
export class SessionFactory extends AbstractFactory {
protected readonly logging: Logging
protected readonly config: Config
/** True if we have printed the memory session warning at least once. */
private static loggedMemorySessionWarningOnce = false
constructor() {
@@ -52,6 +57,11 @@ export class SessionFactory extends AbstractFactory {
return meta
}
/**
* Return the instantiable class of the configured session backend.
* @protected
* @return Instantiable<Session>
*/
protected getSessionClass() {
const SessionClass = this.config.get('server.session.driver', MemorySession)
if ( SessionClass === MemorySession && !SessionFactory.loggedMemorySessionWarningOnce ) {