» Details |
---|
|
» Comment |
I second Markus' suggestions. Overall, nice code. Here are my additions why my vote is conditional: 1) Your methods in their current form are way to long. I think you can break them up into multiple methods, and also refactor your if/else structures to exit early. 2) I'd also rename url() to getUrl() (no params), and I'd use a __construct($identifier, array $options = null) to initialize the class. 3) For the sake of re-using this object, each option provided to the constructur should have a set-method associated. Maybe setOptions() and setIdentifier()? 4) srvGet() - or rather getSrvRecord() - should utilize Net_DNS2. 5) I'd really, really like to see a couple unit tests. Let us know if we can help you. |