Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method getConfig always return null #40

Open
rakucmr opened this issue Sep 21, 2024 · 0 comments
Open

Method getConfig always return null #40

rakucmr opened this issue Sep 21, 2024 · 0 comments

Comments

@rakucmr
Copy link

rakucmr commented Sep 21, 2024

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;
.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant