Skip to content

Instantly share code, notes, and snippets.

@bakura10 bakura10/test.php
Created Dec 18, 2015

Embed
What would you like to do?
<?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
You can’t perform that action at this time.