[FrameworkBundle] Make specifying a custom file_link_format easier

This commit is contained in:
Victor Berchet 2011-04-05 01:15:21 +02:00
parent 9998ab18e9
commit 5a1d5e5082

View File

@ -84,10 +84,12 @@ class FrameworkExtension extends Extension
$container->getDefinition('exception_listener')->setArgument(0, $config['exception_controller']);
$links = array(
'textmate' => 'txmt://open?url=file://%%f&line=%%l',
'macvim' => 'mvim://open?url=file://%%f&line=%%l',
'textmate' => 'txmt://open?url=file://%f&line=%l',
'macvim' => 'mvim://open?url=file://%f&line=%l',
);
$container->setParameter('debug.file_link_format', isset($links[$config['ide']]) ? $links[$config['ide']] : $config['ide']);
$link = isset($links[$config['ide']]) ? $links[$config['ide']] : $config['ide'];
$container->setParameter('debug.file_link_format', str_replace('%', '%%', $link));
if (!empty($config['test'])) {
$loader->load('test.xml');