1 | import { Constructor } from '../Contracts';
|
2 |
|
3 |
|
4 |
|
5 | export declare class Registrar {
|
6 | private providerConstructorParams;
|
7 | private basePath?;
|
8 | |
9 |
|
10 |
|
11 | private providersPaths;
|
12 | |
13 |
|
14 |
|
15 |
|
16 |
|
17 | private providers;
|
18 | |
19 |
|
20 |
|
21 |
|
22 | private providersInstantiater;
|
23 | |
24 |
|
25 |
|
26 | private collected;
|
27 | constructor(providerConstructorParams: any[], basePath?: string | undefined);
|
28 | /**
|
29 | * Load the provider by requiring the file from the disk
|
30 | * and instantiate it. If ioc container is using ES6
|
31 | * imports, then default exports are handled
|
32 | * automatically.
|
33 | */
|
34 | private loadProvider;
|
35 | /**
|
36 | * Loop's over an array of provider paths and pushes them to the
|
37 | * `providers` collection. This collection is later used to
|
38 | * register and boot providers
|
39 | */
|
40 | private collect;
|
41 | /**
|
42 | * Register an array of provider paths
|
43 | */
|
44 | useProviders(providersPaths: string[], callback?: <T extends Constructor<any>>(provider: T) => InstanceType<T>): this;
|
45 | /**
|
46 | * Register all the providers by instantiating them and
|
47 | * calling the `register` method.
|
48 | *
|
49 | * The provider instance will be returned, which can be used
|
50 | * to boot them as well.
|
51 | */
|
52 | register(): Promise<any[]>;
|
53 | /**
|
54 | * Boot all the providers by calling the `boot` method.
|
55 | * Boot methods are called in series.
|
56 | */
|
57 | boot(): Promise<void>;
|
58 | /**
|
59 | * Register an boot providers together.
|
60 | */
|
61 | registerAndBoot(): Promise<any[]>;
|
62 | }
|