From 1a5b615f4d09a07d6a8d0015a4bf43700f4edd86 Mon Sep 17 00:00:00 2001 From: William DURAND Date: Sun, 30 Jan 2011 22:37:30 +0100 Subject: [PATCH] Added default values in PropelExtension --- DependencyInjection/PropelExtension.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/PropelExtension.php b/DependencyInjection/PropelExtension.php index 55c47a0..9890083 100644 --- a/DependencyInjection/PropelExtension.php +++ b/DependencyInjection/PropelExtension.php @@ -66,7 +66,15 @@ class PropelExtension extends Extension 'default_connection' => 'default', ); - $className = $container->getParameter('kernel.debug') ? 'DebugPDO' : 'PropelPDO'; + if (!$container->hasParameter('propel.charset')) { + $container->setParameter('propel.charset', 'utf8'); + } + + if ($container->hasParameter('kernel.debug')) { + $className = $container->getParameter('kernel.debug') ? 'DebugPDO' : 'PropelPDO'; + } else { + $className = 'PropelPDO'; + } $defaultConnection = array( 'driver' => 'mysql',