Re: Re: Final RFC for Net_SMPP/Net_SMPP_Client
| From: | Justin Patrin | Date: | Wed, 20 Jul 2005 00:43:09 +0000 |
| Subject: | Re: Re: Final RFC for Net_SMPP/Net_SMPP_Client | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38766@lists.php.net to get a copy of this message | ||
On 7/19/05, Ian Eure <ieure@php.net> wrote:
> On Tuesday 19 July 2005 04:30 pm, Lukas Smith wrote:
> > Ian Eure wrote:
> > > What I'm looking for here is a good reason why I should break adherence
> > > to the SMPP specification in favor of the PEAR CS. So far, the only
> > > argument I've gotten is "because you have to follow PEAR CS," while
> > > ignoring many significant cases where it's a bad idea, or they are
> > > ignored with no good reason.
> >
> > the point is to make it possible for users and tools to easily determine
> > the location of classes in the directory structure that are referenced
> > in their code ..
> >
> > that this was a good idea was proven once more by the advent of
> > __autoload().
> >
> Ok. I accept that argument. However, I don't know how much it applies to
> Net_SMPP; it knows where it's classes are, and takes care of loading them..
>
True, Net_SMPP may know where its classes are. But if, for some
reason, someone, say, serialized a Net_SMPP command object then
unserialized it __autoload() wouldn't know where to look unless you
put some special checks in it. Or if you included the class yourself
before using the unserialized object (think sessions).
Also, comparing to PHP_Compat isn't really relevant as it is defining
*functions* and not *classes*. The rule is for class names.
Lastly, you don't need a mapping array. The conversion is simple.
$className = str_replace(' ' , '', ucfirst(str_replace('_', '
', $command)));
--
Justin Patrin