libphp-multichain icon indicating copy to clipboard operation
libphp-multichain copied to clipboard

Extensibility

Open ghousseyn opened this issue 8 years ago • 0 comments

Hi,

I've come across an issue using this library which is how we can add more features to it without touching the library itself. One concrete situation is the missing completerawexchange command that I needed but had no way to add it since the client is a private property with no getter. I suggest to decouple the JsonRPC\Client from the MultichainClient which will then be injected ideally in the constructor and provide a getter for it. This way I'd be able to extend MultichainClient and implement new features if required. More importantly I'd also be able to change the connection at runtime without re-instantiating MultichainClient.

Let me know if you're open for a pull request and I'll create one with the suggested changes.

Best

ghousseyn avatar Oct 02 '17 11:10 ghousseyn