BeSimpleSoap/DependencyInjection/WebServiceExtension.php

51 lines
1.3 KiB
PHP
Raw Normal View History

2010-10-04 20:27:00 +02:00
<?php
/*
* This file is part of the WebServiceBundle.
*
* (c) Christian Kerl <christian-kerl@web.de>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
2010-10-04 20:27:00 +02:00
namespace Bundle\WebServiceBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
2010-10-04 20:27:00 +02:00
/**
* WebServiceExtension.
*
* @author Christian Kerl <christian-kerl@web.de>
*/
2010-10-04 20:27:00 +02:00
class WebServiceExtension extends Extension
{
2010-10-04 20:39:04 +02:00
public function configLoad(array $config, ContainerBuilder $configuration)
{
if(!$configuration->hasDefinition('webservice_http_kernel'))
{
2010-10-06 00:00:15 +02:00
$loader = new XmlFileLoader($configuration, __DIR__ . '/../Resources/config');
$loader->load('services.xml');
2010-10-06 00:00:15 +02:00
$configuration->setAlias('http_kernel', 'webservice_http_kernel');
}
2010-10-06 00:00:15 +02:00
$configuration->setParameter('webservice.config.wsdl', $config['wsdl']);
2010-10-04 20:39:04 +02:00
}
2010-10-04 20:27:00 +02:00
public function getXsdValidationBasePath()
{
return null;
}
public function getNamespace()
{
return null;
}
public function getAlias()
{
return 'webservice';
}
}