kj
2 years ago
1 changed files with 27 additions and 0 deletions
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
<?php |
||||
/** |
||||
* Middleware - DuckBrain |
||||
* |
||||
* Librería base para middlewares. |
||||
* |
||||
* @author KJ |
||||
* @website https://kj2.me |
||||
* @licence MIT |
||||
*/ |
||||
|
||||
namespace Libs; |
||||
|
||||
class Middleware { |
||||
|
||||
/** |
||||
* Llama al siguiente callback. |
||||
* |
||||
* @param Neuron $req |
||||
* |
||||
* @return mixed |
||||
*/ |
||||
public static function next(Neuron $req) { |
||||
$next = array_pop($req->next); |
||||
return call_user_func_array($next, [$req]); |
||||
} |
||||
} |
Loading…
Reference in new issue