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

$loop visibility prevent from extending Server #53

Closed
jason69 opened this issue Dec 20, 2016 · 1 comment
Closed

$loop visibility prevent from extending Server #53

jason69 opened this issue Dec 20, 2016 · 1 comment
Labels

Comments

@jason69
Copy link

jason69 commented Dec 20, 2016

Hi,
in Server class
loop property is defined as private

Is there a specific reason for this?
Could it be protected?
Class can't be extended because of that...
Reason why one would extend: add context options or flags to stream_socket_server

@clue clue added the question label Dec 20, 2016
@clue
Copy link
Member

clue commented Dec 20, 2016

The $loop is private because we don't want this to become part of our public API. Keeping this private allows us to change these implementation details without introducing BC breaks.

I agree that keeping this as-is encourages a cleaner design because it makes extending the server more difficult and encourages composition (DI) instead.

This has also already been covered in #12, #14 and #27.

I hope this helps 👍 I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we may reopen this 👍

#40 (comment)

@clue clue closed this as completed Dec 20, 2016
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