Skip to content

Instantly share code, notes, and snippets.

@ChubV
Created November 16, 2012 19:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ChubV/4090022 to your computer and use it in GitHub Desktop.
services:
repository:
class: NSBundle\Repo\MyRepository
arguments: [ @service_container ]
<?php
namespace NSBundle\Repo;
use Symfony\Component\DependencyInjection\Container;
class MyRepository
{
public function __construct(Container $c)
{
$params = $c->get('request')->attributes->get('_route_params');
$id = $params['id'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment