コード例 #1
0
ファイル: WanduLoader.php プロジェクト: wandu/router
 /**
  * {@inheritdoc}
  */
 public function call(ServerRequestInterface $request, $object, $methodName)
 {
     if (!method_exists($object, $methodName) && !method_exists($object, '__call')) {
         throw new HandlerNotFoundException(get_class($object), $methodName);
     }
     // instance container
     $container = $this->container->with();
     // clone
     $this->bindParameter($container, $request);
     $this->bindServerRequest($container, $request);
     return $container->call([$object, $methodName]);
 }