fixed di container configuration

This commit is contained in:
Christian Kerl 2010-10-06 00:00:15 +02:00
parent b083a4f512
commit 783ced3b7b
2 changed files with 8 additions and 6 deletions

View File

@ -25,11 +25,13 @@ class WebServiceExtension extends Extension
{ {
if(!$configuration->hasDefinition('webservice_http_kernel')) if(!$configuration->hasDefinition('webservice_http_kernel'))
{ {
$loader = new XmlFileLoader($configuration, __DIR__ . "/../Resources/config"); $loader = new XmlFileLoader($configuration, __DIR__ . '/../Resources/config');
$loader->load("services.xml"); $loader->load('services.xml');
$configuration->setAlias("http_kernel", "webservice_http_kernel"); $configuration->setAlias('http_kernel', 'webservice_http_kernel');
} }
$configuration->setParameter('webservice.config.wsdl', $config['wsdl']);
} }
public function getXsdValidationBasePath() public function getXsdValidationBasePath()

View File

@ -4,7 +4,7 @@
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd"> xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">
<parameters> <parameters>
<parameter key="request.class">Bundle\WebServiceBundle\SoapRequest</parameter> <parameter key="request.class">Bundle\WebServiceBundle\Soap\SoapRequest</parameter>
</parameters> </parameters>
<services> <services>
@ -14,8 +14,8 @@
<argument type="service" id="controller_resolver" /> <argument type="service" id="controller_resolver" />
</service> </service>
<service id="webservice_soap_server" class="\SoapServer"> <service id="webservice_soap_server" class="SoapServer">
<argument type="string" key="%webservice.config.wsdl%" /> <argument type="string">%webservice.config.wsdl%</argument>
</service> </service>
<service id="webservice_http_kernel" class="Bundle\WebServiceBundle\SoapKernel"> <service id="webservice_http_kernel" class="Bundle\WebServiceBundle\SoapKernel">
<argument type="service" id="webservice_soap_server" /> <argument type="service" id="webservice_soap_server" />