Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HttpFoundation] [Request] add attributes property of Symfony\Component\HttpFoundation\Request object #1083

Merged
merged 3 commits into from Feb 20, 2012

Conversation

sberder-lm
Copy link
Contributor

The documentation was missing this property in Symfony\Component\HttpFoundation\Request.
I found it while debugging (print_r()-of-hell) and found out that it was not in the documentation.

@@ -52,6 +52,8 @@ can be accessed via several public properties:

* ``cookies``: equivalent of ``$_COOKIE``;

* ``attributes``: router parameters (``_controller``, ``_route`` and any placeholder used);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not limited to router parameters at all (and the HttpFoundation does not force you to use Routing at all). HttpKernel uses it to store the parameters matched by the router but other things can be stored in it too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure how to word it and thought I would miss things. I'll try to rephrase it.

@stof
Copy link
Member

stof commented Feb 15, 2012

This description is not good either as it will let think that the class is tied to HttpKernel. I'm quite sure I saw an explanation on it recently. I'm not sure where it was though. You should check the series of articles on @fabpot's blog

weaverryan added a commit that referenced this pull request Feb 20, 2012
[HttpFoundation] [Request] add attributes property of Symfony\Component\HttpFoundation\Request object
@weaverryan weaverryan merged commit 8424fc0 into symfony:2.0 Feb 20, 2012
@weaverryan
Copy link
Member

Hi guys!

I've merged this in - I totally agree that it would be helpful to include the attributes array right in this list. But since the idea is explained in two other places, I made it a bit simpler and used pointers in sha: 4475564.

We may clean this all up a bit later into one grand explanation (right now, explanations are a bit duplicated), but at least it's now complete, and the links will help us keep all of the explanations together.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants