Commit 4ee8c457 authored by tufengqi's avatar tufengqi

swoft yii2

parent 4700c5b6
<?php
class response
{
public function withHeaders($header_arr)
{
\Yii::$app->response->format = Response::FORMAT_RAW;
foreach ($header_arr as $key => $val) {
\Yii::$app->response->headers->add($key, $value);
}
return $this;
}
public function withContent($content)
{
return $content;
}
}
function response()
{
return new response();
}
\ No newline at end of file
<?php
require __DIR__ . '/Functions.php';
require __DIR__ . '/YiiToSwoftClassReplace.php';
\ No newline at end of file
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