From c13a96131baf27693c5d37267238a01577daa099 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Mon, 18 Jul 2011 22:59:20 +0200 Subject: [PATCH] Replaced webservice.* service name by besimple.soap.* --- .gitignore | 1 + Controller/SoapWebServiceController.php | 4 +- DependencyInjection/BeSimpleSoapExtension.php | 8 +-- .../Compiler/WebServiceResolverPass.php | 8 +-- Resources/config/loaders.xml | 26 +++++----- Resources/config/webservice.xml | 49 +++++++++---------- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 09fafaa..e4cd1e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ phpunit.xml vendor +*.swp diff --git a/Controller/SoapWebServiceController.php b/Controller/SoapWebServiceController.php index 8449470..90eede1 100644 --- a/Controller/SoapWebServiceController.php +++ b/Controller/SoapWebServiceController.php @@ -163,10 +163,10 @@ class SoapWebServiceController extends ContainerAware private function getWebServiceContext($webservice) { - if(!$this->container->has('webservice.context.'.$webservice)) + if(!$this->container->has('besimple.soap.context.'.$webservice)) { throw new NotFoundHttpException(sprintf('No webservice with name "%s" found.', $webservice)); } - return $this->container->get('webservice.context.'.$webservice); + return $this->container->get('besimple.soap.context.'.$webservice); } } diff --git a/DependencyInjection/BeSimpleSoapExtension.php b/DependencyInjection/BeSimpleSoapExtension.php index f03810f..5f132e4 100644 --- a/DependencyInjection/BeSimpleSoapExtension.php +++ b/DependencyInjection/BeSimpleSoapExtension.php @@ -27,7 +27,7 @@ class BeSimpleSoapExtension extends Extension { private $contextArguments; - // maps config options to service suffix' + // maps config options to service suffix private $bindingConfigToServiceSuffixMap = array('rpc-literal' => '.rpcliteral', 'document-wrapped' => '.documentwrapped'); public function load(array $configs, ContainerBuilder $container) @@ -55,13 +55,13 @@ class BeSimpleSoapExtension extends Extension if (null === $this->contextArguments) { $this->contextArguments = $container - ->getDefinition('webservice.context') + ->getDefinition('besimple.soap.context') ->getArguments() ; } - $contextId = 'webservice.context.'.$config['name']; - $context = $container->setDefinition($contextId, $definition = new DefinitionDecorator('webservice.context')); + $contextId = 'besimple.soap.context.'.$config['name']; + $context = $container->setDefinition($contextId, $definition = new DefinitionDecorator('besimple.soap.context')); $arguments = array(); foreach($this->contextArguments as $i => $argument) { diff --git a/DependencyInjection/Compiler/WebServiceResolverPass.php b/DependencyInjection/Compiler/WebServiceResolverPass.php index bde6e76..06bd755 100644 --- a/DependencyInjection/Compiler/WebServiceResolverPass.php +++ b/DependencyInjection/Compiler/WebServiceResolverPass.php @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** - * Adds tagged webservice.definition.loader services to ebservice.definition.resolver service + * Adds tagged besimple.soap.definition.loader services to ebservice.definition.resolver service * * @author Francis Besset */ @@ -23,13 +23,13 @@ class WebServiceResolverPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { - if (false === $container->hasDefinition('webservice.definition.loader.resolver')) { + if (false === $container->hasDefinition('besimple.soap.definition.loader.resolver')) { return; } - $definition = $container->getDefinition('webservice.definition.loader.resolver'); + $definition = $container->getDefinition('besimple.soap.definition.loader.resolver'); - foreach ($container->findTaggedServiceIds('webservice.definition.loader') as $id => $attributes) { + foreach ($container->findTaggedServiceIds('besimple.soap.definition.loader') as $id => $attributes) { $definition->addMethodCall('addLoader', array(new Reference($id))); } } diff --git a/Resources/config/loaders.xml b/Resources/config/loaders.xml index ac6c859..51c4e10 100644 --- a/Resources/config/loaders.xml +++ b/Resources/config/loaders.xml @@ -5,28 +5,28 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - Symfony\Component\Config\Loader\LoaderResolver - Symfony\Component\Config\Loader\DelegatingLoader - BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationDirectoryLoader - BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationFileLoader - BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationClassLoader + Symfony\Component\Config\Loader\LoaderResolver + Symfony\Component\Config\Loader\DelegatingLoader + BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationDirectoryLoader + BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationFileLoader + BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationClassLoader - + - - + + - - + + - + - - + + diff --git a/Resources/config/webservice.xml b/Resources/config/webservice.xml index a242499..514c2b4 100644 --- a/Resources/config/webservice.xml +++ b/Resources/config/webservice.xml @@ -4,45 +4,44 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - BeSimple\SoapBundle\Controller\SoapWebServiceController - BeSimple\SoapBundle\WebServiceContext - %kernel.cache_dir%/webservice - BeSimple\SoapBundle\ServiceBinding\RpcLiteralRequestMessageBinder - BeSimple\SoapBundle\ServiceBinding\RpcLiteralResponseMessageBinder - BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedRequestMessageBinder - BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedResponseMessageBinder - BeSimple\SoapBundle\ServiceDefinition\Dumper\WsdlDumper - BeSimple\SoapBundle\Converter\ConverterRepository - BeSimple\SoapBundle\Converter\TypeRepository + BeSimple\SoapBundle\WebServiceContext + %kernel.cache_dir%/webservice + BeSimple\SoapBundle\ServiceBinding\RpcLiteralRequestMessageBinder + BeSimple\SoapBundle\ServiceBinding\RpcLiteralResponseMessageBinder + BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedRequestMessageBinder + BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedResponseMessageBinder + BeSimple\SoapBundle\ServiceDefinition\Dumper\WsdlDumper + BeSimple\SoapBundle\Converter\ConverterRepository + BeSimple\SoapBundle\Converter\TypeRepository - - - - - - - + + + + + + + - %webservice.cache_dir% + %besimple.soap.cache_dir% %kernel.debug% - + - + - + - + - + - + - + xsd http://www.w3.org/2001/XMLSchema