Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs #244

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading