BeSimpleSoap/ServiceDefinition/Annotation/TypedElement.php

40 lines
837 B
PHP
Raw Normal View History

2011-04-09 00:40:31 +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.
*/
namespace Bundle\WebServiceBundle\ServiceDefinition\Annotation;
abstract class TypedElement
{
private $phpType;
private $xmlType;
2011-07-14 17:45:03 +02:00
2011-04-09 00:40:31 +02:00
public function __construct($values)
{
foreach(array('type', 'phpType') as $key)
{
if(isset($values[$key]))
{
$this->phpType = $values[$key];
}
}
2011-07-14 17:45:03 +02:00
2011-04-09 00:40:31 +02:00
$this->xmlType = isset($values['xmlType']) ? $values['xmlType'] : null;
}
2011-07-14 17:45:03 +02:00
2011-04-09 00:40:31 +02:00
public function getPhpType()
{
return $this->phpType;
}
2011-07-14 17:45:03 +02:00
2011-04-09 00:40:31 +02:00
public function getXmlType()
{
return $this->xmlType;
}
}