Example #1
0
 /**
  * Get a response.
  *
  * @param array $vars Extra values.
  *
  * @return mixed
  */
 public function response(array $vars = [])
 {
     $this->dp->setNamedArgs($vars);
     $app = $this;
     foreach (array_reverse($this->router->getStacks()) as $stackClass) {
         $app = new $stackClass($app);
     }
     return $app->handle($this->req);
 }