Moved Classmap instance in ServiceDefinition

This commit is contained in:
Francis Besset
2011-11-26 12:18:29 +01:00
parent ea65831c12
commit bacdc90870
6 changed files with 29 additions and 22 deletions

View File

@ -11,6 +11,7 @@
namespace BeSimple\SoapBundle\ServiceDefinition;
use BeSimple\SoapBundle\Util\Collection;
use BeSimple\SoapCommon\Classmap;
class ServiceDefinition
{
@ -29,16 +30,22 @@ class ServiceDefinition
*/
private $methods;
/**
* @var \BeSimple\SoapCommon\Classmap
*/
private $classmap;
private $complexTypes = array();
public function __construct($name = null, $namespace = null, array $methods = array())
public function __construct($name = null, $namespace = null, array $methods = array(), Classmap $classmap = null)
{
$this->setName($name);
$this->setNamespace($namespace);
$this->methods = new Collection('getName', 'BeSimple\SoapBundle\ServiceDefinition\Method');
$this->setMethods($methods);
$this->classmap = $classmap;
}
/**
@ -111,6 +118,16 @@ class ServiceDefinition
return $types;
}
public function getClassmap()
{
return $this->classmap ?: array();
}
public function setClassmap(Classmap $classmap)
{
$this->classmap = $classmap;
}
public function addDefinitionComplexType($type, Collection $complexType)
{
$this->complexTypes[$type] = $complexType;