Skip to content

Commit ef7740f

Browse files
committed
WIP
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent 27625c3 commit ef7740f

10 files changed

Lines changed: 452 additions & 17 deletions

File tree

docs/book/v1/component/collection.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Create Collection
22

3+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#optional-add-dot-maker-to-composerjson).
4+
35
> Collections can be created only in APIs.
46
7+
## Run the command
8+
59
To create a Collection, use either of the following commands:
610

711
```shell
@@ -14,7 +18,9 @@ OR
1418
./vendor/bin/dot-maker collection
1519
```
1620

17-
`dot-maker` needs to determine in which module you want to create the new Collection.
21+
## Identify the target module
22+
23+
`dot-maker` needs to know in which module you want to create the new Collection.
1824
To determine this, it will prompt you to enter the name of an existing module:
1925

2026
> Existing module name:
@@ -25,7 +31,7 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
2531
2632
and will keep prompting for a valid module name until you provide one.
2733

28-
---
34+
## Name the Collection
2935

3036
Once the target module has been identified, you will be prompted to input a name for the Collection:
3137

@@ -43,8 +49,11 @@ If you input the name of an existing Collection (like, "ExistingCollection"), an
4349

4450
> Class "ExistingCollection" already exists at /path/to/project/src/ExistingModule/src/Collection/ExistingCollection.php
4551
46-
If you input a valid name, `dot-maker` will create the Collection and output a success message:
52+
If you input a valid name (like, "NewCollection"), `dot-maker` will create the Collection and output a success message:
4753

4854
> Created Collection: /path/to/project/src/ExistingModule/src/Collection/NewCollection.php
4955
56+
## Create multiple Collections
57+
5058
To allow the creation of multiple Collections, the process will loop until you leave the name blank.
59+
Each iteration creates a new Collection under the same module.

docs/book/v1/component/command.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Create Command
22

3+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#optional-add-dot-maker-to-composerjson).
4+
5+
> `dot-maker` will look for a matching ServiceInterface in the module (e.g.: BookServiceInterface — BookCommand).
6+
> If it finds one, it will automatically inject it into the Command.
7+
38
To create a Command, use either of the following commands:
49

10+
## Run the command
11+
512
```shell
613
composer make command
714
```
@@ -12,7 +19,9 @@ OR
1219
./vendor/bin/dot-maker command
1320
```
1421

15-
`dot-maker` needs to determine in which module you want to create the new Command.
22+
## Identify the target module
23+
24+
`dot-maker` needs to know in which module you want to create the new Command.
1625
To determine this, it will prompt you to enter the name of an existing module:
1726

1827
> Existing module name:
@@ -23,7 +32,7 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
2332
2433
and will keep prompting for a valid module name until you provide one.
2534

26-
---
35+
## Name the Command
2736

2837
Once the target module has been identified, you will be prompted to input a name for the Command:
2938

@@ -41,11 +50,11 @@ If you input the name of an existing Command (like, "ExistingCommand"), an error
4150

4251
> Class "ExistingCommand" already exists at /path/to/project/src/ExistingModule/src/Command/ExistingCommand.php
4352
44-
If you input a valid name, `dot-maker` will create the Command and output a success message:
53+
If you input a valid name (like, "NewCommand"), `dot-maker` will create the Command and output a success message:
4554

46-
> Created Collection: /path/to/project/src/ExistingModule/src/Command/NewCommand.php
55+
> Created Command: /path/to/project/src/ExistingModule/src/Command/NewCommand.php
4756
48-
To allow the creation of multiple Commands, the process will loop until you leave the name blank.
57+
## Create multiple Commands
4958

50-
> dot-maker will look for a matching ServiceInterface in the module (e.g.: BookServiceInterface — BookCommand).
51-
> If it finds one, it will automatically inject it into the Command.
59+
To allow the creation of multiple Commands, the process will loop until you leave the name blank.
60+
Each iteration creates a new Command under the same module.

docs/book/v1/component/middleware.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Create Middleware
22

3+
> This page assumes that you have created a Composer "make" script as described on the [Setup page](../setup.md#optional-add-dot-maker-to-composerjson).
4+
35
To create a Middleware, use either of the following commands:
46

7+
## Run the command
8+
59
```shell
610
composer make middleware
711
```
@@ -12,7 +16,9 @@ OR
1216
./vendor/bin/dot-maker middleware
1317
```
1418

15-
`dot-maker` needs to determine in which module you want to create the new Middleware.
19+
## Identify the target module
20+
21+
`dot-maker` needs to know in which module you want to create the new Middleware.
1622
To determine this, it will prompt you to enter the name of an existing module:
1723

1824
> Existing module name:
@@ -23,7 +29,7 @@ If you input a module name which does not exist (like, "NonExistentModule"), an
2329
2430
and will keep prompting for a valid module name until you provide one.
2531

26-
---
32+
## Name the Middleware
2733

2834
Once the target module has been identified, you will be prompted to input a name for the Middleware:
2935

@@ -41,8 +47,11 @@ If you input the name of an existing Middleware (like, "ExistingMiddleware"), an
4147

4248
> Class "ExistingMiddleware" already exists at /path/to/project/src/ExistingModule/src/Middleware/ExistingMiddleware.php
4349
44-
If you input a valid name, `dot-maker` will create the Command and output a success message:
50+
If you input a valid name (like, "NewMiddleware"), `dot-maker` will create the Command and output a success message:
4551

4652
> Created Middleware: /path/to/project/src/ExistingModule/src/Middleware/NewMiddleware.php
4753
54+
## Create multiple Middleware
55+
4856
To allow the creation of multiple Middleware, the process will loop until you leave the name blank.
57+
Each iteration creates a new Middleware under the same module.

0 commit comments

Comments
 (0)