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

Adds a Torrent interface #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adds a Torrent interface #61

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 11, 2016

I need to be able to use my own Torrent model with the Transmission lib.

This PR adds a TorrentInterface and change the Transmission.php dependency from the Torrent implementation to this new interface.

@afk11
Copy link
Contributor

afk11 commented Oct 11, 2016

One small nit/question: why have the setters on the TorrentInterface? Surely to fulfill the contract for a 'torrent' you need to ask for the torrents details, and or construct it in an implementation-specific manner, but not expose setters?

@ghost
Copy link
Author

ghost commented Oct 11, 2016

Hm… I guess it is to make the interface fully interoperable with the rest of the code. I mean, if the Transmission.php lib (or other Torrent-dependant public classes) takes the responsibility to change a Torrent objet, the contract will still be compatible.

But sure, for now that is not obviously needed. Do you see any drawback to keep setters in the interface? What would you suggest?

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

Successfully merging this pull request may close these issues.

1 participant