ArikaimServerFactory
in package
Arikaim server factory
Table of Contents
Constants
- DEFAULT_SERVER_LIB = 'swoole'
- DEFAULT_SERVER_TYPE = 'services'
- SERVER_TYPE = ['http', 'services', 'websocket']
- SERVERS_LIST = ['http' => ['swoole' => 'Arikaim\\Core\\Server\\Swoole\\HttpServer'], 'services' => ['swoole' => 'Arikaim\\Core\\Server\\Swoole\\ServicesServer'], 'websocket' => ['swoole' => 'Arikaim\\Core\\Server\\Swoole\\WebSocketServer']]
- Server classes list
Methods
- create() : ServerInterface|null
- Create server instance
- getConsoleOptions() : array<string|int, mixed>
- Get console options
- loadConfigFile() : array<string|int, mixed>|null
- Load config file
Constants
DEFAULT_SERVER_LIB
public
mixed
DEFAULT_SERVER_LIB
= 'swoole'
DEFAULT_SERVER_TYPE
public
mixed
DEFAULT_SERVER_TYPE
= 'services'
SERVER_TYPE
public
mixed
SERVER_TYPE
= ['http', 'services', 'websocket']
SERVERS_LIST
Server classes list
public
mixed
SERVERS_LIST
= ['http' => ['swoole' => 'Arikaim\\Core\\Server\\Swoole\\HttpServer'], 'services' => ['swoole' => 'Arikaim\\Core\\Server\\Swoole\\ServicesServer'], 'websocket' => ['swoole' => 'Arikaim\\Core\\Server\\Swoole\\WebSocketServer']]
Methods
create()
Create server instance
public
static create([array<string|int, mixed>|null $options = null ]) : ServerInterface|null
Parameters
- $options : array<string|int, mixed>|null = null
Return values
ServerInterface|nullgetConsoleOptions()
Get console options
public
static getConsoleOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>loadConfigFile()
Load config file
public
static loadConfigFile(string $fileName) : array<string|int, mixed>|null
Parameters
- $fileName : string