You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
823 B

import AbstractFactory from '../../../../di/src/factory/AbstractFactory.ts'
import MemorySession from './MemorySession.ts'
import Session from './Session.ts'
import {DependencyRequirement} from '../../../../di/src/type/DependencyRequirement.ts'
import {Collection} from '../../collection/Collection.ts'
import SessionInterface from './SessionInterface.ts'
// TODO support configurable session backends
export default class SessionFactory extends AbstractFactory {
constructor() {
super({})
}
produce(dependencies: any[], parameters: any[]): SessionInterface {
return new MemorySession()
}
match(something: any) {
return something === Session
}
get_dependency_keys(): Collection<DependencyRequirement> {
return new Collection<DependencyRequirement>()
}
}