Skip to content

Instantly share code, notes, and snippets.

@hannesvdvreken
Created September 10, 2015 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannesvdvreken/41c6567679d134da36d0 to your computer and use it in GitHub Desktop.
Save hannesvdvreken/41c6567679d134da36d0 to your computer and use it in GitHub Desktop.
<?php
class ResolvableMiddleware
{
public function __construct(ContainerInterface $container, $classname)
{
$this->container = $container;
$this->classname = $classname;
}
public function handle(RequestInterface $request)
{
return $this->container->get($this->classname)->handle($request);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment