Comments for "Net_SMPP_Client"

» Submit Your Comment
Comments are only accepted during the "Proposal" phase. This proposal is currently in the "Finished" phase.
» Comments
  • bertrand Gugger  [2005-04-23 11:33 UTC]

    Sure ! It's an interessant prospect for Net_SMS. (btw, I did not get your message)
    Well indicated for bulk sendings and more dedicaced controls.
    It could implement the existing APIs for
    http://www.clickatell.com/brochure/products/api_smpp.php
    and
    http://www.sms2email.com/supportdocuments/smpp_api.pdf
    and others...

    Unfortunately, I'm very doubtfull about your structure based on GLOBALS. Example, Net_Monitor uses Net_SMS but enable several providers: how you do that with globals ?
    (common remark with Net_SMPP)
  • Mirco Bauer  [2005-04-23 13:40 UTC]

    Do not use globals, use a variable inside your class instead. (relying on globals btw shows bad OO design)
    the class itself looks ok, but you pass references to bools?!? having return values which are references is ok, but that is mainly for objects. please correct this two issues.
  • Ian Eure  [2005-04-23 18:14 UTC]

    On Globals:
    I do not have a "structure based on GLOBALS." What I have is data which an instance of Net_SMPP_Client needs stored in two global vars. They are only ever used for lookup; all state information is held in the object.

    Moving them into the class would be wasteful, since there would be many copies of the data (one for each instance) when only one copy is needed for all instances. It would also make debugging harder, since they would appear in print_r() output, but serve no useful purpose there.

    On passing references:
    Unfortunately, there's no way to pass a bool by value and an object by reference. If I were to remove the &s from those functions, I would end up copying objects all over the place.

    I agree that it's a bit unconventional, but it works, and doesn't generate any warnings under E_ALL.
  • Nikolas Coukouma  [2005-04-23 19:11 UTC]

    re: golbal variable for lookup:

    make the hash a static variable in a member function. For example:
    class Foo {
    function getHash() {
    static hash = array( 1, 2 );
    return hash;
    }
    }