eee
This commit is contained in:
@@ -185,7 +185,7 @@ class Message extends Component implements MessageInterface
|
||||
if (isset($this->headers[$name])) {
|
||||
$header = $this->headers[$name];
|
||||
|
||||
return is_string($header) ? [$header] : $header;
|
||||
return \is_string($header) ? [$header] : $header;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
@@ -212,7 +212,7 @@ class Message extends Component implements MessageInterface
|
||||
public function getHeaderLine(string $name): string
|
||||
{
|
||||
// TODO: Implement getHeaderLine() method.
|
||||
return implode(';', $this->getHeader($name));
|
||||
return \implode(';', $this->getHeader($name));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@ class Handler implements RequestHandlerInterface
|
||||
public function handle(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$data = call_user_func($this->handler, ...$this->parameter);
|
||||
|
||||
/** 根据返回类型 */
|
||||
return $this->format->call($data);
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class SwooleHttpResponseEmitter implements ResponseEmitterInterface
|
||||
}
|
||||
$response->header('Run-Time', $this->getRunTime($request));
|
||||
$response->header('Server', 'swoole');
|
||||
$response->header('Swoole-Version', swoole_version());
|
||||
$response->header('Swoole-Version', \swoole_version());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user