I'm trying to use the symfony2 service container.However when I construct each service I want to use some of the variables defined in my controller.I want to know whether that's possible and how to do it.or an alternative if the aforementioned is not possible.
p.s: I'm using the yml service definitions.
$_ws['configurator'] = cmfGetInitObject(); //returns an instance of cmlObj
$_ws['configurator']->setOptions(
array(
'configurationsFolderPath' => realpath(dirname(__FILE__) . '/../configurations'),
'server' => &$_SERVER,
'legacyFormatEnabled' => true
)
);
$_ws['packageManager'] =& $_ws['configurator']->packageManager;
$_ws = $_ws['configurator']->load($_ws); //$_ws['configurator'] again resolves to a cmlObj
this is the array containing the configurations I mentioned.