generated from AthennaIO/Template
-
-
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.
feat: add service and provider ejs templates
- Loading branch information
Showing
8 changed files
with
89 additions
and
3 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
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
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
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
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,32 @@ | ||
import { ServiceProvider } from '@athenna/ioc' | ||
|
||
export class <%= namePascal %>Provider extends ServiceProvider { | ||
/** | ||
* All the container bindings that should be registered. | ||
*/ | ||
bindings = {} | ||
|
||
/** | ||
* All the container instances that should be registered. | ||
*/ | ||
instances = {} | ||
|
||
/** | ||
* All the container singletons that should be registered. | ||
*/ | ||
singletons = {} | ||
|
||
/** | ||
* Register any application services. | ||
* | ||
* @return void | ||
*/ | ||
register() {} | ||
|
||
/** | ||
* Bootstrap any application services. | ||
* | ||
* @return void | ||
*/ | ||
boot() {} | ||
} |
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,32 @@ | ||
import { ServiceProvider } from '@athenna/ioc' | ||
|
||
export class <%= namePascal %>Provider extends ServiceProvider { | ||
/** | ||
* All the container bindings that should be registered. | ||
*/ | ||
public bindings = {} | ||
|
||
/** | ||
* All the container instances that should be registered. | ||
*/ | ||
public instances = {} | ||
|
||
/** | ||
* All the container singletons that should be registered. | ||
*/ | ||
public singletons = {} | ||
|
||
/** | ||
* Register any application services. | ||
* | ||
* @return void | ||
*/ | ||
public register() {} | ||
|
||
/** | ||
* Bootstrap any application services. | ||
* | ||
* @return void | ||
*/ | ||
public boot() {} | ||
} |
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,9 @@ | ||
export class <%= namePascal %>Service { | ||
/** | ||
* Use the constructor to resolve any dependency of the Ioc container | ||
* | ||
* @param _container | ||
* @return <%= namePascal %>Service | ||
*/ | ||
constructor(_container) {} | ||
} |
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,11 @@ | ||
import { Container } from 'providers/Container' | ||
|
||
export class <%= namePascal %>Service { | ||
/** | ||
* Use the constructor to resolve any dependency of the Ioc container | ||
* | ||
* @param _container | ||
* @return <%= namePascal %>Service | ||
*/ | ||
public constructor(_container: Container) {} | ||
} |