Use the fantastic sfContext instance in your Symfony2 project.
This bundle is a joke. Please do not use.
First, grab sfContextBundle using Composer:
composer require francisbesset/sfContextBundle:~1.0
Then register the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new sfContextBundle\sfContextBundle(),
);
}
<?php
// any class, code
sfContext::getInstance()->getContainer();
ENJOY!