@@ -48,7 +48,7 @@ location / {
4848After configuration, you can use PhpRouter in your entry point (` index.php ` ) like this example.
4949
5050```
51- use MiladRahimi\PHPRouter \Router;
51+ use MiladRahimi\PhpRouter \Router;
5252
5353$router = new Router();
5454
@@ -66,7 +66,7 @@ of course, PhpRouter supports plenty of controller types which will be discussed
6666Following example demonstrates how to define simple routes.
6767
6868```
69- use MiladRahimi\PHPRouter \Router;
69+ use MiladRahimi\PhpRouter \Router;
7070use Zend\Diactoros\Response\HtmlResponse;
7171use Zend\Diactoros\Response\JsonResponse;
7272
@@ -92,7 +92,7 @@ $router->dispatch();
9292You can use the following PhpRouter methods to map different HTTP methods to the controllers.
9393
9494```
95- use MiladRahimi\PHPRouter \Router;
95+ use MiladRahimi\PhpRouter \Router;
9696
9797$router = new Router();
9898
@@ -122,7 +122,7 @@ $router->dispatch();
122122You may need to use other HTTP methods or your custom ones, no worry, there is ` Router::map() ` method for you.
123123
124124```
125- use MiladRahimi\PHPRouter \Router;
125+ use MiladRahimi\PhpRouter \Router;
126126
127127$router = new Router();
128128
@@ -149,7 +149,7 @@ If your controller is not sensitive about HTTP methods and
149149it is going to respond regardless to what HTTP method is, the method ` Router::any() ` is for you.
150150
151151```
152- use MiladRahimi\PHPRouter \Router;
152+ use MiladRahimi\PhpRouter \Router;
153153
154154$router = new Router();
155155
@@ -164,7 +164,7 @@ $router->dispatch();
164164PhpRouter supports plenty of controller types, just look at following examples.
165165
166166```
167- use MiladRahimi\PHPRouter \Router;
167+ use MiladRahimi\PhpRouter \Router;
168168
169169$router = new Router();
170170
@@ -190,7 +190,7 @@ $router->dispatch();
190190Using a class for controller could be nice:
191191
192192```
193- use MiladRahimi\PHPRouter \Router;
193+ use MiladRahimi\PhpRouter \Router;
194194
195195$router = new Router();
196196
@@ -212,7 +212,7 @@ The controller class can also have a namespace:
212212```
213213namespace App\Http\Controllers;
214214
215- use MiladRahimi\PHPRouter \Router;
215+ use MiladRahimi\PhpRouter \Router;
216216
217217$router = new Router();
218218
@@ -236,7 +236,7 @@ Some endpoints have variable parts like IDs in URLs.
236236We call them the route parameters, and you can catch them with controller parameters with the same names.
237237
238238```
239- use MiladRahimi\PHPRouter \Router;
239+ use MiladRahimi\PhpRouter \Router;
240240
241241$router = new Router();
242242
@@ -266,7 +266,7 @@ $router->dispatch();
266266In default, route parameters can match any value, but you can define a regular expression for it if you want to.
267267
268268```
269- use MiladRahimi\PHPRouter \Router;
269+ use MiladRahimi\PhpRouter \Router;
270270
271271class BlogController
272272{
@@ -295,7 +295,7 @@ It uses [Zend implementation](https://github.com/zendframework/zend-diactoros) o
295295You can catch the request object like the example.
296296
297297```
298- use MiladRahimi\PHPRouter \Router;
298+ use MiladRahimi\PhpRouter \Router;
299299use Zend\Diactoros\ServerRequest;
300300use Zend\Diactoros\Response\EmptyResponse;
301301
@@ -330,7 +330,7 @@ Your controllers can return a string value as the response, it will be considere
330330You can also return JSON, plain text and empty responses by provided zend-diactoros package.
331331
332332```
333- use MiladRahimi\PHPRouter \Router;
333+ use MiladRahimi\PhpRouter \Router;
334334use Zend\Diactoros\ServerRequest;
335335use Zend\Diactoros\Response\EmptyResponse;
336336use Zend\Diactoros\Response\HtmlResponse;
@@ -367,7 +367,7 @@ $router->dispatch();
367367Your controllers can redirect user to another url as well.
368368
369369```
370- use MiladRahimi\PHPRouter \Router;
370+ use MiladRahimi\PhpRouter \Router;
371371use Zend\Diactoros\ServerRequest;
372372use Zend\Diactoros\Response\RedirectResponse;
373373
@@ -427,8 +427,8 @@ it passes the request to next middleware or controller (if there is no more midd
427427if the header is absent it returns an empty response with ` 401 Authorization Failed ` HTTP status code.
428428
429429```
430- use MiladRahimi\PHPRouter \Router;
431- use MiladRahimi\Router \Middleware;
430+ use MiladRahimi\PhpRouter \Router;
431+ use MiladRahimi\PhpRouter \Middleware;
432432use Psr\Http\Message\ResponseInterface;
433433use Psr\Http\Message\ServerRequestInterface;
434434
@@ -463,7 +463,7 @@ it may assign subdomain dynamically to users like blog hosting services.
463463In this case, you need to specify domain or subdomain in addition to the URIs in your routes.
464464
465465```
466- use MiladRahimi\PHPRouter \Router;
466+ use MiladRahimi\PhpRouter \Router;
467467use Zend\Diactoros\ServerRequest;
468468use Zend\Diactoros\Response\RedirectResponse;
469469
@@ -492,7 +492,7 @@ Usually routes can fit in a groups that have common attributes like middleware,
492492To group the routes you can follow the example below.
493493
494494```
495- use MiladRahimi\PHPRouter \Router;
495+ use MiladRahimi\PhpRouter \Router;
496496
497497$router = new Router();
498498
@@ -521,7 +521,7 @@ In the previous version, there was a `setBaseUri()` method but it's removed in t
521521You still can have the same functionality with grouping your routes and using prefix attribute.
522522
523523```
524- use MiladRahimi\PHPRouter \Router;
524+ use MiladRahimi\PhpRouter \Router;
525525
526526$router = new Router();
527527
@@ -537,7 +537,7 @@ You can name your routes and use their names to get their information or check c
537537You can set the route name via ` name ` parameter or using ` useName() ` method before defining the route.
538538
539539```
540- use MiladRahimi\PHPRouter \Router;
540+ use MiladRahimi\PhpRouter \Router;
541541
542542$router = new Router();
543543
@@ -557,7 +557,7 @@ Since your application runs through the `Router::disptach()` method,
557557you should put it in a ` try ` block and catch exceptions that will be thrown by your application and the router.
558558
559559```
560- use MiladRahimi\PHPRouter \Router;
560+ use MiladRahimi\PhpRouter \Router;
561561
562562$router = new Router();
563563
0 commit comments