Skip to content

Commit

Permalink
Fix docs (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizcmarin committed May 22, 2024
1 parent 45f9571 commit 98969eb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://github.com/yiisoft" target="_blank">
<img src="https://yiisoft.github.io/docs/images/yii_logo.svg" height="100px">
<img src="https://yiisoft.github.io/docs/images/yii_logo.svg" height="100px" alt="Yii">
</a>
<h1 align="center">Yii Router</h1>
<br>
Expand All @@ -23,7 +23,7 @@ with an adapter package. Currently, the only adapter available is [FastRoute](ht

- URL matching and URL generation supporting HTTP methods, hosts, and defaults.
- Good IDE support for defining routes.
- Route groups with infinite nesting.
- Route groups with infinite nesting.
- Middleware support for both individual routes and groups.
- Ready to use middleware for route matching.
- Convenient `CurrentRoute` service that holds information about last matched route.
Expand Down Expand Up @@ -105,7 +105,7 @@ $response = $result->process($request, $notFoundHandler);
> features and, especially, pattern syntax may differ. To check usage and configuration details, please refer
> to specific adapter documentation. All examples in this document are for
> [FastRoute adapter](https://github.com/yiisoft/router-fastroute).
### Middleware usage

In order to simplify usage in PSR-middleware based application, there is a ready to use middleware provided:
Expand Down Expand Up @@ -187,7 +187,7 @@ Route::methods([Method::GET, Method::POST], '/page/add')
It is typically used for a certain actions that could be reused for multiple routes such as authentication.

If there is a need to either add middleware to be executed first or remove existing middleware from a route,
`prependMiddleware()` and `disableMiddleware()` could be used.
`prependMiddleware()` and `disableMiddleware()` could be used.

If you combine routes from multiple sources and want last route to have priority over existing ones, mark it as "override":

Expand Down Expand Up @@ -378,7 +378,7 @@ final class PostController

In addition to commonly used `getArgument()` method, the following methods are available:

- `getArguments()` - To obtain all arguments at once.
- `getArguments()` - To obtain all arguments at once.
- `getName()` - To get route name.
- `getHost()` - To get route host.
- `getPattern()` - To get route pattern.
Expand Down
14 changes: 12 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,22 @@
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/router/issues?state=open",
"source": "https://github.com/yiisoft/router",
"forum": "https://www.yiiframework.com/forum/",
"wiki": "https://www.yiiframework.com/wiki/",
"irc": "ircs://irc.libera.chat:6697/yii",
"chat": "https://t.me/yii3en",
"source": "https://github.com/yiisoft/router"
"chat": "https://t.me/yii3en"
},
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/yiisoft"
},
{
"type": "github",
"url": "https://github.com/sponsors/yiisoft"
}
],
"require": {
"php": "^8.0",
"psr/event-dispatcher": "^1.0",
Expand Down

0 comments on commit 98969eb

Please sign in to comment.