Added KeyValue type
This commit is contained in:
parent
2b60cec190
commit
db885b2be7
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue