Skip to content

Commit

Permalink
v2.0... Enhanced Router features. Added Request & Response support vi…
Browse files Browse the repository at this point in the history
…a Symfony components. Updated middlewares and a lot of code optimization.
  • Loading branch information
izniburak committed Nov 21, 2020
1 parent 8c2095b commit 4e78faf
Show file tree
Hide file tree
Showing 8 changed files with 648 additions and 544 deletions.
24 changes: 16 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,39 @@
"name": "izniburak/router",
"type": "library",
"description": "simple router class for php",
"keywords": ["php","router","route","simple"],
"keywords": [
"router",
"route",
"routing"
],
"homepage": "https://github.com/izniburak/php-router",
"license": "MIT",
"authors": [
{
"name": "İzni Burak Demirtaş",
"email": "info@burakdemirtas.org",
"homepage": "http://burakdemirtas.org"
"homepage": "https://burakdemirtas.org"
}
],
"require": {
"php": ">=5.5.0"
"php": ">=7.2.5",
"ext-json": "*",
"symfony/http-foundation": "^5.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.0",
"guzzlehttp/guzzle": "^5.3"
"phpunit/phpunit": "^8.5 || ^9.4",
"guzzlehttp/guzzle": "^7.2"
},
"autoload": {
"psr-4": {
"Buki\\": "src"
}
"Buki\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Buki\\Tests\\": "tests/"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
16 changes: 16 additions & 0 deletions src/Http/Controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Buki\Http;

abstract class Controller extends Http
{
/**
* @var array Before Middlewares
*/
public $middlewareBefore = [];

/**
* @var array After Middlewares
*/
public $middlewareAfter = [];
}
8 changes: 8 additions & 0 deletions src/Http/Http.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Buki\Http;

abstract class Http
{
//
}
8 changes: 8 additions & 0 deletions src/Http/Middleware.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Buki\Http;

abstract class Middleware extends Http
{
//
}
Loading

0 comments on commit 4e78faf

Please sign in to comment.