Commit cebfd16e authored by tufengqi's avatar tufengqi

fix swoft yii

parent 4ee8c457
......@@ -3,9 +3,9 @@ class response
{
public function withHeaders($header_arr)
{
\Yii::$app->response->format = Response::FORMAT_RAW;
\Yii::$app->response->format = yii\web\Response::FORMAT_RAW;
foreach ($header_arr as $key => $val) {
\Yii::$app->response->headers->add($key, $value);
\Yii::$app->response->headers->add($key, $val);
}
return $this;
}
......@@ -14,6 +14,7 @@ class response
return $content;
}
}
function response()
{
return new response();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment