Skip to content

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