gotzmann / comet

Modern PHP framework for building blazing fast REST APIs and microservices
MIT License
661 stars 52 forks source link

Method getConfig always return null #40

Open rakucmr opened 2 months ago

rakucmr commented 2 months ago

It can be resolved by changing constructor like this to retain passed config variable

public function __construct(array $config = null) { // Store config values self::$config = $config; // Set up params with user defined or default values self::$workers = $config['workers'] ?? 0; self::$host = $config['host'] ?? '0.0.0.0'; self::$port = $config['port'] ?? 80; self::$debug = $config['debug'] ?? false; self::$logger = $config['logger'] ?? null; self::$container = $config['container'] ?? null; .....