Skip to content

Commit b223a78

Browse files
committed
Update use-controller read.md
更新 controller document
1 parent 2f6d92d commit b223a78

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 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,7 +71,7 @@ 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.
74+
> NOTE: There is a known bug of MultiActionController not working in 2.0.3, we'll fix it soon next version.
7675
7776
# Get HTTP Input
7877

@@ -194,7 +193,7 @@ Set Message when redirect:
194193
$this->setRedirect('pages.html', 'Save success', 'success');
195194
```
196195

197-
We can override redirect target everywhere when executing.
196+
We can override redirect target anywhere when executing.
198197

199198
``` php
200199
// In doExecute()

0 commit comments

Comments
 (0)