Added KeyValue type

This commit is contained in:
Francis Besset 2013-02-27 17:03:38 +01:00
parent 2b60cec190
commit db885b2be7
7 changed files with 118 additions and 0 deletions

View File

@ -0,0 +1,34 @@
<?php
namespace BeSimple\SoapCommon\Type;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
abstract class AbstractKeyValue
{
/**
* @Soap\ComplexType("string")
*/
protected $key;
/**
* The Soap type of this variable must be defined in child class
*/
protected $value;
public function __construct($key, $value)
{
$this->key = $key;
$this->value = $value;
}
public function getKey()
{
return $this->key;
}
public function getValue()
{
return $this->value;
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace BeSimple\SoapCommon\Type\KeyValue;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use BeSimple\SoapCommon\Type\AbstractKeyValue;
class Boolean extends AbstractKeyValue
{
/**
* @Soap\ComplexType("boolean")
*/
protected $value;
}

View File

@ -0,0 +1,14 @@
<?php
namespace BeSimple\SoapCommon\Type\KeyValue;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use BeSimple\SoapCommon\Type\AbstractKeyValue;
class Date extends AbstractKeyValue
{
/**
* @Soap\ComplexType("date")
*/
protected $value;
}

View File

@ -0,0 +1,14 @@
<?php
namespace BeSimple\SoapCommon\Type\KeyValue;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use BeSimple\SoapCommon\Type\AbstractKeyValue;
class DateTime extends AbstractKeyValue
{
/**
* @Soap\ComplexType("dateTime")
*/
protected $value;
}

View File

@ -0,0 +1,14 @@
<?php
namespace BeSimple\SoapCommon\Type\KeyValue;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use BeSimple\SoapCommon\Type\AbstractKeyValue;
class Float extends AbstractKeyValue
{
/**
* @Soap\ComplexType("float")
*/
protected $value;
}

View File

@ -0,0 +1,14 @@
<?php
namespace BeSimple\SoapCommon\Type\KeyValue;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use BeSimple\SoapCommon\Type\AbstractKeyValue;
class Int extends AbstractKeyValue
{
/**
* @Soap\ComplexType("int")
*/
protected $value;
}

View File

@ -0,0 +1,14 @@
<?php
namespace BeSimple\SoapCommon\Type\KeyValue;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use BeSimple\SoapCommon\Type\AbstractKeyValue;
class String extends AbstractKeyValue
{
/**
* @Soap\ComplexType("string")
*/
protected $value;
}