Re: OO wrappers (was : Need 1 more vote for Image_IPTC class)
| From: | Xavier Noguer | Date: | Tue, 08 Apr 2003 15:01:59 +0000 |
| Subject: | Re: OO wrappers (was : Need 1 more vote for Image_IPTC class) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15037@lists.php.net to get a copy of this message | ||
El Mar 08 Abr 2003 10:45, Lukas Smith escribió:
> > From: Xavier Noguer [mailto:xnoguer@rezebra.com]
> > Sent: Tuesday, April 08, 2003 4:38 PM
> > I'm not following you. I don't see how:
>
> Maybe I am not following that Rasmus and you are saying either :-)
>
> > $foo = new Foo();
> > $foo->bared();
> >
> > is better than:
> >
> > $foo = foo_create();
> > foo_bared($foo);
> >
> > I'm talking about plain wrappers, wrappers that don't add any
> > functionality
> > to the one provided by the original php extension they are wrapping.
>
> I did not look at the details of the class from which this thread
> originated, but if I understood the issue correctly this class does add
> functionality beyond what the PHP implementation does.
That's true. I think Rasmus's idea was why not add this functionality
directly into php's iptc code (see ext/standard/iptc.c).
> Of course there is no reason to wrap PHP native functionality just to
> make everything PEAR CS compatible. PEAR aims to extend PHP and not to
> wrap all of PHP functionality into a different API.
That was my point.
Xavier