Skip to content

Commit 256d2f5

Browse files
committed
Merge pull request #11 from skylying/patch-8
Update use-controller read.md
2 parents 38e8e2b + 7719189 commit 256d2f5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.vaseman/entries/documentation/mvc/use-controller.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Use Controller
66
# Controller Overview
77

88
Windwalker Controller is a main entry of a page, after routing, the request input and IoC container will be injected
9-
into controller and execute it. Every our code of this page will start at `doExecute()`.
9+
into controller and execute it. Any code mentioned in this section will be executed in `doExecute()`, the entrance of controller.
1010

1111
Simple usage of controller:
1212

@@ -30,14 +30,13 @@ class GetController extends Controller
3030
## Single Action Pattern
3131

3232
Windwalker Controller follows single responsibility principle, every controller has only one action (`execute()`).
33-
The benefit is that our controllers will be more lighter then other frameworks. You can add more logic to a controller but won't be
34-
confused by many actions in one class.
33+
The benefit is that our controllers will be much more lighter then other frameworks. You can add more logic to a controller without being confused by too many actions in one class.
3534

3635
## Use Multiple Actions
3736

3837
But if you want to use multiple actions like traditional practice, Windwalker also support it.
3938

40-
First, your controller should extends to `MultiActionController`:
39+
First, your controller should extend from `MultiActionController`:
4140

4241
``` php
4342
use Flower\Controller\Sakura\SakuraController;
@@ -72,8 +71,6 @@ flower:
7271

7372
The action prefix with double colons will be methods of your controller.
7473

75-
> NOTE: There is a found bug of MultiActionController in 2.0.3 that make it not work, we'll fix it soon after next version.
76-
7774
# Get HTTP Input
7875

7976
See: [Request and Input](../start/request-input.html), we can use Input object to get HTTP queries:
@@ -194,7 +191,7 @@ Set Message when redirect:
194191
$this->setRedirect('pages.html', 'Save success', 'success');
195192
```
196193

197-
We can override redirect target everywhere when executing.
194+
We can override redirect target anywhere when executing.
198195

199196
``` php
200197
// In doExecute()

0 commit comments

Comments
 (0)