/** * Call * @param array $env * @return array[status, header, body] */ public function call(&$env) { try { return $this->app->call($env); } catch (Exception $e) { $env['slim.log']->error($e); $response = new Slim_Http_Response($this->renderBody($env, $e), 500); return $response->finalize(); } }
/** * 执行下一个预处理中间件调用 * @return void */ public final function runNext() { if ($this->nextMw) { $this->nextMw->call(); } }