From 98969eb86377333fbf01a2eb2ef4382e928b197b Mon Sep 17 00:00:00 2001
From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com>
Date: Wed, 22 May 2024 10:24:27 -0300
Subject: [PATCH] Fix docs (#244)
---
README.md | 10 +++++-----
composer.json | 14 ++++++++++++--
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 591b6f3..e7d5567 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
Yii Router
@@ -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.
@@ -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:
@@ -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":
@@ -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.
diff --git a/composer.json b/composer.json
index 3ecb66f..9ea5032 100644
--- a/composer.json
+++ b/composer.json
@@ -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",