Added KeyValue type
This commit is contained in:
parent
2b60cec190
commit
db885b2be7
34
src/BeSimple/SoapCommon/Type/AbstractKeyValue.php
Normal file
34
src/BeSimple/SoapCommon/Type/AbstractKeyValue.php
Normal 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;
|
||||
}
|
||||
}
|
14
src/BeSimple/SoapCommon/Type/KeyValue/Boolean.php
Normal file
14
src/BeSimple/SoapCommon/Type/KeyValue/Boolean.php
Normal 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;
|
||||
}
|
14
src/BeSimple/SoapCommon/Type/KeyValue/Date.php
Normal file
14
src/BeSimple/SoapCommon/Type/KeyValue/Date.php
Normal 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;
|
||||
}
|
14
src/BeSimple/SoapCommon/Type/KeyValue/DateTime.php
Normal file
14
src/BeSimple/SoapCommon/Type/KeyValue/DateTime.php
Normal 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;
|
||||
}
|
14
src/BeSimple/SoapCommon/Type/KeyValue/Float.php
Normal file
14
src/BeSimple/SoapCommon/Type/KeyValue/Float.php
Normal 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;
|
||||
}
|
14
src/BeSimple/SoapCommon/Type/KeyValue/Int.php
Normal file
14
src/BeSimple/SoapCommon/Type/KeyValue/Int.php
Normal 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;
|
||||
}
|
14
src/BeSimple/SoapCommon/Type/KeyValue/String.php
Normal file
14
src/BeSimple/SoapCommon/Type/KeyValue/String.php
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user