- Small WIP of template and adjusted the composer.json allowing registration into the autoload
This commit is contained in:
1 parent
db8bf36cf7
commit
ec873145d2
3 files changed
+69
-2
No files matched your search
@@ -21,10 +21,12 @@ class JavascriptMiddleware implements MiddlewareInterface
|
||||
"headers" => [
|
||||
"User-Agent" => "TheBugs/1.0",
|
||||
],
|
||||
# Callable functions
|
||||
"functions" => []
|
||||
];
|
||||
|
||||
/**
|
||||
* Filter list, allows custom invokable
|
||||
* Filter list, allows custom invokable too
|
||||
* @var array
|
||||
*/
|
||||
protected $filters = [];
|
||||
@@ -56,6 +58,12 @@ class JavascriptMiddleware implements MiddlewareInterface
|
||||
}
|
||||
}
|
||||
|
||||
foreach($this->filters['functions'] as $func) {
|
||||
if ( $func->bindTo($this, $this)() ) {
|
||||
return $handler->handle($request);
|
||||
}
|
||||
}
|
||||
|
||||
$this->throwError(json_decode($request->getBody(), true));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user