PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_SMS » Bug #5101

[PATCH] generic_smpp driver

Details

Request #5101[PATCH] generic_smpp driver
Submitted2005-08-16 07:53 UTC
Fromieure at php dot net
Assignedyunosh
StatusNo Feedback
PackageNet_SMS
PHP VersionIrrelevant
OSLinux
Roadmaps(Not assigned)

Comments

[2005-08-16 07:53 UTC] ieure at php dot net

Description:
------------
I submitted this a while back, but there was a
disagreement over a patch for the Net_SMPP core.

So, here's the plain SMPP driver for Net_SMS, split from
the core changes.

http://atomized.org/PEAR/Net_SMS/generic_smpp.phps

Please let me know if this works for you, or if you want
anything changed. I could also propose it as a subpackage
(Net_SMS_SMPP?), since it will bloat the package dep.
chain (it requires Net_SMPP_Client, Net_Socket, and
Net_SMPP).

[2005-08-16 08:50 UTC] ieure at php dot net

"...if you want to take advantage of factory or singleton
and keep the PEAR's CS, you cannot use _ in your
extension. The factory does only one level ... so , I
think Net_SMS_SMPP suits better."

That's fine by me, but I was just following the style
currently used by Net_SMS. Some of the other drivers are:
generic_smtp, win_http, clickatell_http and so on.


"By *not* requiring 'Net/SMS.php',
do you want to force the user to use Net_SMS:factory() ?"

Not necessarily, I just wasn't aware that you wanted to
support direct instantiation. I can add it if it's an
issue.


"What is the intention in added method accept() ?"

This is passed through to Net_SMPP_Client, and allows you
to feed it an instance of Log to see the SMPP message
flow.

[2005-08-16 09:28 UTC] ieure at php dot net

"- The naming is fine.
- You should fix the class phpdoc description.
- Not require'ing Net/SMS.php is fine too, we don't do
this in the other drivers either."

Ok.


"- gettext strings (in getParams()) should be in double
quotes, and in this method be more descriptive."

Why? Single- and double-quotes are functionally identical.


"- phpdoc for _send() needs to fixed."

Fixed.


"- Error conditions in _send() should return
PEAR::raiseError()."

Can you more clearly define "error conditions?" There
appear to be error conditions which return an array
instead of PEAR_Error the other drivers.


"- _send() should not return by reference.
- _authenticate() shouldn't echo.
- accept() should be documented."

Fixed.