List Info

Thread: Re: +1 for Web Services::Services_Yadis




Re: +1 for Web Services::Services_Yadis
user name
2007-07-19 14:36:14
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/=Pea
rFanatic", 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.patternsforp
hp.com


----- Original Message ----
From: Philippe Jausions <pear11abacus.com>
To: PEAR developer mailinglist <pear-devlists.php.net>
Cc: Philippe Jausions <pear11abacus.com>; Pádraic
Brady <padraic.bradyyahoo.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.ph
p?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








       
____________________________________________________________
________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/
Re: +1 for Web Services::Services_Yadis
user name
2007-07-19 14:42:54
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...)

 -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/=Pea
rFanatic", 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.patternsforp
hp.com
>
>
> ----- Original Message ----
> From: Philippe Jausions <pear11abacus.com>
> To: PEAR developer mailinglist <pear-devlists.php.net>
> Cc: Philippe Jausions <pear11abacus.com>; Pádraic
Brady
> <padraic.bradyyahoo.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.ph
p?id=499&handle=jausions
> <http://pear.php.net/pepr/pepr-vote-sho
w.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://searc
h.yahoo.com/search?fr=oni_on_mail&p=summer+activities+fo
r+kids&cs=bz>

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: +1 for Web Services::Services_Yadis
user name
2007-07-19 14:47:36
On 7/19/07, Philippe Jausions <Philippe.Jausions11abacus.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/=Pea
rFanatic", 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.patternsforp
hp.com
> >
> >
> > ----- Original Message ----
> > From: Philippe Jausions <pear11abacus.com>
> > To: PEAR developer mailinglist <pear-devlists.php.net>
> > Cc: Philippe Jausions <pear11abacus.com>; Pádraic Brady
> > <padraic.bradyyahoo.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.ph
p?id=499&handle=jausions
> > <http://pear.php.net/pepr/pepr-vote-sho
w.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://searc
h.yahoo.com/search?fr=oni_on_mail&p=summer+activities+fo
r+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

--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )