mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-03 12:17:48 +08:00
Removed useless word 'server'
This commit is contained in:
parent
bc4efc9849
commit
0b0c1f389b
@ -61,13 +61,13 @@ class Server
|
||||
throw new \InvalidArgumentException('Server not exist.');
|
||||
}
|
||||
if (! $this->server) {
|
||||
$serverName = $serverConfig['name'] ?? 'httpServer';
|
||||
$serverName = $serverConfig['name'] ?? 'http';
|
||||
$this->server = new $server(...$constructor);
|
||||
$callbacks = array_replace($this->defaultCallbacks(), $callbacks);
|
||||
$this->registerSwooleEvents($this->server, $callbacks, $serverName);
|
||||
$this->server->set($settings);
|
||||
} else {
|
||||
$serverName = $serverConfig['name'] ?? 'httpServer' . $i;
|
||||
$serverName = $serverConfig['name'] ?? 'http' . $i;
|
||||
$slaveServer = $this->server->addlistener(...$constructor);
|
||||
$this->registerSwooleEvents($slaveServer, $callbacks, $serverName);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class AutoController extends AbstractAnnotation
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $server = 'httpServer';
|
||||
public $server = 'http';
|
||||
|
||||
public function __construct($value = null)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class Controller extends AbstractAnnotation
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $server = 'httpServer';
|
||||
public $server = 'http';
|
||||
|
||||
public function __construct($value = null)
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ class DispatcherFactory
|
||||
$class = ReflectionManager::reflectClass($className);
|
||||
$methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
|
||||
$prefix = $this->getPrefix($className, $values['prefix'] ?? '');
|
||||
$router = $this->getRouter($values['server'] ?? 'httpServer');
|
||||
$router = $this->getRouter($values['server'] ?? 'http');
|
||||
|
||||
foreach ($methods as $method) {
|
||||
$path = $this->parsePath($prefix, $method);
|
||||
@ -122,7 +122,7 @@ class DispatcherFactory
|
||||
private function handleController(string $className, array $controllerMetadata, array $methodMetadata): void
|
||||
{
|
||||
$prefix = $this->getPrefix($className, $controllerMetadata['prefix'] ?? '');
|
||||
$router = $this->getRouter($controllerMetadata['prefix'] ?? 'httpServer');
|
||||
$router = $this->getRouter($controllerMetadata['prefix'] ?? 'http');
|
||||
|
||||
foreach ($methodMetadata as $method => $values) {
|
||||
$mappingAnnotations = [
|
||||
|
@ -26,7 +26,7 @@ class Router
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $serverName = 'httpServer';
|
||||
protected static $serverName = 'http';
|
||||
|
||||
/**
|
||||
* @var DispatcherFactory
|
||||
@ -43,7 +43,7 @@ class Router
|
||||
{
|
||||
static::$serverName = $serverName;
|
||||
call($callback);
|
||||
static::$serverName = 'httpServer';
|
||||
static::$serverName = 'http';
|
||||
}
|
||||
|
||||
public static function init(DispatcherFactory $factory)
|
||||
|
@ -57,7 +57,7 @@ class Server implements ServerOnRequestInterface
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serverName = 'httpServer';
|
||||
private $serverName = 'http';
|
||||
|
||||
public function __construct(
|
||||
array $middlewares,
|
||||
|
Loading…
Reference in New Issue
Block a user