-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Application Configurator interface (incomplete)
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
ServiceProvider, | ||
ServiceProviderConstructor, | ||
} from "@aedart/contracts/support/services"; | ||
import BootstrapperConstructor from "../BootstrapperConstructor"; | ||
import Application from '../Application'; | ||
|
||
/** | ||
* TODO: Incomplete... | ||
* | ||
* Application Configurator | ||
* | ||
* Responsible for setup and configuration of a given application, | ||
* e.g. registration of "core" bindings, bootstrappers, service providers, ...etc. | ||
*/ | ||
export default interface Configurator | ||
{ | ||
/** | ||
* TODO: Move to application interface! | ||
* | ||
* Set the "core" bootstrappers the application must use | ||
* | ||
* @param {BootstrapperConstructor[]} bootstrappers | ||
* | ||
* @returns {this} | ||
*/ | ||
withBootstrappers(bootstrappers: BootstrapperConstructor[]): this; | ||
|
||
/** | ||
* TODO: Move to application interface! | ||
* | ||
* Set the "core" service providers to be registered by the application | ||
* | ||
* @param {(ServiceProvider | ServiceProviderConstructor)[]} providers | ||
* | ||
* @returns {this} | ||
*/ | ||
withServiceProviders(providers: (ServiceProvider | ServiceProviderConstructor)[]): this; | ||
|
||
/** | ||
* TODO: This method should be the only method in this interface... | ||
* | ||
* Applies setup and configuration of the application and returns it | ||
* | ||
* @returns {Application} | ||
*/ | ||
apply(): Application; | ||
} |