Hi Rob, Can you show an example of what you try to achieve and it's not working without the a setUser() method? Are you working with a specific implementation?
Please keep in mind that most of the entities in PSR-7 are immutable, including UriInterface. You can read also meta document to understand design decision: https://www.php-fig.org/psr/psr-7/meta/ Regards, Alex On Mon, Mar 18, 2019 at 4:24 PM Robert Crous <robert.crou...@gmail.com> wrote: > Hey Alex! > > Not quite, I do know of it's existence but I'm actually wanting to have > access to something along the lines of... > > public function setUser() > { > return $this->user; > } > > Problem with the current set of methods is that I am unable to get the > password out of Uri without doing string 'hackery' outside of the spec of > this interface. > > Hence me suggesting one should be added :) > > On Mon, Mar 18, 2019 at 4:04 PM Alexandru Pătrănescu <dreal...@gmail.com> > wrote: > >> >> Hi Rob, >> >> In UriInterface there is this method: >> public function withUserInfo($user, $password = null): UriInterface; >> >> >> https://github.com/php-fig/http-message/blob/master/src/UriInterface.php#L207 >> >> >> I guess this is what you want. >> >> Regards >> Alex >> >> On Mon, Mar 18, 2019 at 3:37 PM Robert Crous <robert.crou...@gmail.com> >> wrote: >> >>> 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 php-fig+unsubscr...@googlegroups.com. >>> To post to this group, send email to php-fig@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/php-fig/b45e38a2-222c-4b3a-afb6-bd2f130547f7%40googlegroups.com >>> <https://groups.google.com/d/msgid/php-fig/b45e38a2-222c-4b3a-afb6-bd2f130547f7%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> 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 php-fig+unsubscr...@googlegroups.com. >> To post to this group, send email to php-fig@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/php-fig/CAAwdEzD%2B27j25hv%2B1bPWaLXiX37rvgFUkAVQV-sdsGm45bk-Jg%40mail.gmail.com >> <https://groups.google.com/d/msgid/php-fig/CAAwdEzD%2B27j25hv%2B1bPWaLXiX37rvgFUkAVQV-sdsGm45bk-Jg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > Kind Regards, > > Robert Crous > > -- > 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 php-fig+unsubscr...@googlegroups.com. > To post to this group, send email to php-fig@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/php-fig/CAOEKAZzRawBfTxAJPjfR59PGvYVJUSrBAM4OZNbxgppG-j1ofA%40mail.gmail.com > <https://groups.google.com/d/msgid/php-fig/CAOEKAZzRawBfTxAJPjfR59PGvYVJUSrBAM4OZNbxgppG-j1ofA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 php-fig+unsubscr...@googlegroups.com. To post to this group, send email to php-fig@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAAwdEzBpPk1kLNUDh8XE2B9gV4h%3D08ofeh-GSSirPXCoR%2BkppQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.