refactored code to better separate responsibilities

This commit is contained in:
Christian Kerl
2011-02-03 01:07:08 +01:00
parent e53b83616b
commit 047db378c7
8 changed files with 190 additions and 101 deletions

View File

@ -11,7 +11,7 @@
<parameter key="webservice.definition.class">Bundle\WebServiceBundle\ServiceDefinition\ServiceDefinition</parameter>
<parameter key="webservice.definition.loader.class">Bundle\WebServiceBundle\ServiceDefinition\Loader\XmlFileLoader</parameter>
<parameter key="webservice.definition.dumper.class">Bundle\WebServiceBundle\Tests\StaticFileDumper</parameter>
<parameter key="webservice.definition.dumper.class">Bundle\WebServiceBundle\ServiceDefinition\Dumper\WsdlFileDumper</parameter>
</parameters>
<services>
@ -23,14 +23,12 @@
<service id="webservice.kernel" class="Bundle\WebServiceBundle\SoapKernel">
<argument type="service" id="webservice.binder" />
<argument type="service" id="webservice.converter.repository" />
<argument type="service" id="webservice.server.factory" />
<argument type="service" id="symfony_http_kernel" />
</service>
<service id="webservice.binder" class="Bundle\WebServiceBundle\ServiceBinding\ServiceBinder">
<argument type="service" id="webservice.definition" />
<argument type="service" id="webservice.definition.loader" />
<argument type="service" id="webservice.definition.dumper" />
<argument type="service" id="webservice.binder.request" />
<argument type="service" id="webservice.binder.response" />
@ -39,6 +37,12 @@
<service id="webservice.binder.request" class="%webservice.binder.request.class%" />
<service id="webservice.binder.response" class="%webservice.binder.response.class%" />
<service id="webservice.server.factory" class="Bundle\WebServiceBundle\Soap\SoapServerFactory">
<argument type="service" id="webservice.definition" />
<argument type="service" id="webservice.converter.repository" />
<argument type="service" id="webservice.definition.dumper" />
</service>
<service id="webservice.converter.repository" class="Bundle\WebServiceBundle\Converter\ConverterRepository">
<call method="registerTypeConverterServices">
<argument type="service" id="service_container" />
@ -47,6 +51,8 @@
<service id="webservice.definition" class="%webservice.definition.class%" shared="true">
<argument type="string">%webservice.definition.name%</argument>
<argument type="string">%webservice.definition.namespace%</argument>
<configurator service="webservice.definition.loader" method="loadServiceDefinition" />
</service>
<service id="webservice.definition.loader" class="%webservice.definition.loader.class%">
<argument type="string">%webservice.definition.resource%</argument>