Re: Can a PEAR package rely on an external PHP script

From: Date: Mon, 16 Jun 2008 06:10:01 +0000
Subject: Re: Can a PEAR package rely on an external PHP script
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50286@lists.php.net to get a copy of this message
On Sun, Jun 15, 2008 at 11:07 PM, Jonathan Street <jonathan@torrentialwebdev.com> wrote: > I'm considering putting together a PEAR package for interacting with a > web service. Conceivably there are two packages needed, one to handle > authentication and a second to fetch the data. There is already a > script available to handle the authentication but nothing available > for fetching the data. Is it appropriate to rely on the existing > script for authentication or should they both be PEAR scripts? The > usage would be along the lines of: > > $auth = new externalClass; > > $credentials = $auth->processLogin($authVars); > > $data = new PEARClass; > > $results = $data->fetch($credentials); > > It would be possible to port the external class to a PEAR package but > the specification is frustrating to work with and I would prefer to > avoid this if possible. If you have already implemented the spec in PHP, what is the real problem with porting it to PEAR? Usually this only involves adjusting method names, comments, indentation and such. > I can't see anything in the documentation which would prohibit this > but I'm also unaware of any other packages doing similar. I don't think there is a rule against this, but I doubt it makes sense. If people can't use your PEAR package without fetching more code from external resources, what is the advantage of having the package in PEAR at all? Martin

« previous php.pear.dev (#50286) next »