That assumes a user info is always user:password, which is not the case.  It 
could be some other format of string.  Hard-coding one particular format into 
the spec would be limiting.

You've already noted that parsing the string yourself is only a few lines of 
code.  Moving those few lines of code into the class wouldn't buy much, 
especially given that it's non-standard.

Besides, specs once approved are not subject to change so we couldn't simply 
add such a method now anyway without a new PSR. :-)

--Larry Garfield

On Mon, Mar 18, 2019, at 9:43 PM, Robert Crous wrote:
> Ah,
> 
> I see, this is the part that I missed,
> 
> As userinfo is a subcomponent would it not make sense to have an 
> interface for this so that we can have access to the user and 
> (optional) password properties on it?
> 
> On Monday, March 18, 2019 at 4:26:36 PM UTC+2, Nicholas Ruunu wrote:
> > Hi Rob,
> > 
> > It's not replacing anything, userinfo is part of URI: 
> > https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
> > 
> > It would be stranger to deal with user/pass imo since that'd be more of an 
> > abstraction.
> > 
> > Den måndag 18 mars 2019 kl. 14:37:05 UTC+1 skrev Robert Crous:
> >> Hi all,
> >> 
> >> I understand that `Uri(some_url)->userInfo` returns the result of 
> >> `parse_url(some_url)[user]` (and then optionally append ':' . [pass]).
> >> 
> >> My question is: why are there no setters and getters available for `user` 
> >> and `pass`?
> >> 
> >> I can't see any reason why having getters/setters available for user + 
> >> pass would disrupt anything and it seems fairly odd that the decision was 
> >> made to replace this with `getUserInfo` and `withUserInfo`.
> >> 
> >> But is there a specific reason why this was done?
> >> 
> >> And if not- is there any way this can be added to the spec for the URI 
> >> interface?
> >> 
> >> Kind Regards,
> >> 
> >> Rob

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/3b6330d7-5d6a-4247-afb2-9f86eebb0852%40www.fastmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to