Skip to content

fix container use in action #324

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

Merged
merged 2 commits into from
May 27, 2011
Merged

Conversation

gimler
Copy link
Contributor

@gimler gimler commented May 27, 2011

No description provided.

@@ -115,7 +115,7 @@ simple example from inside a controller:
$author = new Acme\BlogBundle\Author();
// ... do something to the $author object

$validator = $container->get('validator');
$validator = $this->container->get('validator');
Copy link
Member

Choose a reason for hiding this comment

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

you're totally right, but we can do even better via just

$validator = $this->get('validator');

@gimler
Copy link
Contributor Author

gimler commented May 27, 2011

i have changed it in all code snippets that displays a controller action

weaverryan added a commit that referenced this pull request May 27, 2011
@weaverryan weaverryan merged commit e2d74a5 into symfony:master May 27, 2011
@weaverryan
Copy link
Member

Ah, great thanks! It's nice to get things like this more consistent - it's been merged.

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.

2 participants