Created
December 18, 2015 19:15
-
-
Save bakura10/89c46482972b1e2bebf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyMiddleware | |
{ | |
private $mapping; | |
public function __invoke($request, $response, $out) | |
{ | |
$var = $request->getAttribute('job'); | |
$middleware = $this->mapping[$var]; | |
// I need to fetch $middlware and execute it | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment