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

Let's Config static properties to non-static. #94

Closed
Moln opened this issue Jul 12, 2022 · 2 comments
Closed

Let's Config static properties to non-static. #94

Moln opened this issue Jul 12, 2022 · 2 comments
Labels

Comments

@Moln
Copy link
Contributor

Moln commented Jul 12, 2022

I will try use it combine swoole for connect multiple replications. Let's Config static properties to non-static will be better.

$config = (new ConfigBuilder())
    ->withUser('root')
    ->withHost('192.168.1.10')
    ->withPort(3306)
    ->withPassword('123456')
    ->build();

$config2 = (new ConfigBuilder())
    ->withUser('root')
    ->withHost('192.168.1.11')
    ->withPort(3306)
    ->withPassword('123456')
    ->build();

var_dump($config->getHost()); //192.168.1.11

Expected Result.

Output: 192.168.1.10

Actual Result.

Output: 192.168.1.11

@krowinski
Copy link
Owner

Hi, I can change this but I think you will unable to run consume in one php process.

@krowinski
Copy link
Owner

done in #104

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

No branches or pull requests

2 participants