title: Symfony2 - Access kernel from a compiler pass
body: <p>Is there a way to access the kernel from inside a compiler pass?  I've tried this:</p>
  
  <pre><code>    ...
      public function process(ContainerBuilder $container)
      {
          $kernel = $container-&gt;get('kernel');
      }
      ...
  </code></pre>
  
  <p>This throws an error.  Is there another way to do it?</p>