Re: [PEPr] +1 for Web Services::Services_Yadis

From: Date: Thu, 19 Jul 2007 19:47:36 +0000
Subject: Re: [PEPr] +1 for Web Services::Services_Yadis
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47645@lists.php.net to get a copy of this message
On 7/19/07, Philippe Jausions <Philippe.Jausions@11abacus.com> wrote:
Paddy, I was merely referring to the following line of codes:
            require_once 'Services/Yadis/Xri.php';
            $this->_yadisUrl = Services_Yadis_Xri::getInstance()
                    ->setNamespace($this->_namespace)
                    ->toUri($yadisId);
you're chaining method calls "->", and I'm just wondering if it's acceptable CS-wise (line wrapping or not, and so on...)
Defenatly acceptable. Fluent interfaces.. there's already a serie of packages doing that: Only one I have in mind is Text_CAPTCHA_Numeral
-Philippe Pádraic Brady wrote: Hi Phillipe, Added some HTTP_Request option methods to Yadis.php (see setHttpRequestOptions() ). Also gets pushed into Yadis/Xri.php when its instantiated. On the first point - not sure I follow? A Yadis ID and Yadis URL are not always the same thing. For example, and it's the main exception, an XRI such as "=PearFanatic" is normalised to a URL using an XDI proxy to become "http://xri.net/=PearFanatic", a valid URI that can be requested for a suitable XRD document. So both methods point in some circumstances to the normalised, and non-normalised IDs. That's why any setYadisId() call immediately puts a call to setYadisUrl(), while a getYadisUrl() doesn't return the favour. An option is to remove any confusion altogether - make setYadisUrl() protected and setYadisId() as the sole public method? Thanks for the vote! Paddy Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com ----- Original Message ---- From: Philippe Jausions <pear@11abacus.com> To: PEAR developer mailinglist <pear-dev@lists.php.net> Cc: Philippe Jausions <pear@11abacus.com>; Pádraic Brady <padraic.brady@yahoo.com> Sent: Thursday, July 19, 2007 8:04:13 PM Subject: [PEAR-DEV] [PEPr] +1 for Web Services::Services_Yadis Philippe Jausions (http://pear.php.net/user/jausions) has voted +1 on the proposal for Web Services::Services_Yadis. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=499 Vote information: http://pear.php.net/pepr/pepr-vote-show.php?id=499&handle=jausions <http://pear.php.net/pepr/pepr-vote-show.php?id=499&handle=jausions> This vote is conditional. The condition is: In setYadisUrl(): I don't think PEAR has any defined standard for cascading method calls, but putting them in seperate line is kind of weird to me. With HTTP_Request you need the ability to pass some options to the constructor, for instance: $options('httpOptions'=>array('timeout'=>12, 'proxy_host' => '123.45.67.89')) to your constructor, and then in the code new HTTP_Request($url, $this->_options['httpOptions']); -- Sent by PEPr, the automatic proposal system at http://pear.php.net -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php <http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz> -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18

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