Skip to content

Commit 4e78faf

Browse files
committed
v2.0... Enhanced Router features. Added Request & Response support via Symfony components. Updated middlewares and a lot of code optimization.
1 parent 8c2095b commit 4e78faf

8 files changed

+648
-544
lines changed

composer.json

+16-8
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,39 @@
22
"name": "izniburak/router",
33
"type": "library",
44
"description": "simple router class for php",
5-
"keywords": ["php","router","route","simple"],
5+
"keywords": [
6+
"router",
7+
"route",
8+
"routing"
9+
],
610
"homepage": "https://github.com/izniburak/php-router",
711
"license": "MIT",
812
"authors": [
913
{
1014
"name": "İzni Burak Demirtaş",
1115
"email": "[email protected]",
12-
"homepage": "http://burakdemirtas.org"
16+
"homepage": "https://burakdemirtas.org"
1317
}
1418
],
1519
"require": {
16-
"php": ">=5.5.0"
20+
"php": ">=7.2.5",
21+
"ext-json": "*",
22+
"symfony/http-foundation": "^5.1"
1723
},
1824
"require-dev": {
19-
"phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.0",
20-
"guzzlehttp/guzzle": "^5.3"
25+
"phpunit/phpunit": "^8.5 || ^9.4",
26+
"guzzlehttp/guzzle": "^7.2"
2127
},
2228
"autoload": {
2329
"psr-4": {
24-
"Buki\\": "src"
25-
}
30+
"Buki\\": "src"
31+
}
2632
},
2733
"autoload-dev": {
2834
"psr-4": {
2935
"Buki\\Tests\\": "tests/"
3036
}
31-
}
37+
},
38+
"minimum-stability": "dev",
39+
"prefer-stable": true
3240
}

src/Http/Controller.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Buki\Http;
4+
5+
abstract class Controller extends Http
6+
{
7+
/**
8+
* @var array Before Middlewares
9+
*/
10+
public $middlewareBefore = [];
11+
12+
/**
13+
* @var array After Middlewares
14+
*/
15+
public $middlewareAfter = [];
16+
}

src/Http/Http.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Buki\Http;
4+
5+
abstract class Http
6+
{
7+
//
8+
}

src/Http/Middleware.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Buki\Http;
4+
5+
abstract class Middleware extends Http
6+
{
7+
//
8+
}

0 commit comments

Comments
 (0)