Add 'src/BeSimple/SoapBundle/' from commit 'e99f707b105c0a0472260d8d42a5a14a7fb7a211'
git-subtree-dir: src/BeSimple/SoapBundle git-subtree-mainline:9a8d23fa23
git-subtree-split:e99f707b10
This commit is contained in:
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
*/
|
||||
class ComplexType extends Configuration
|
||||
{
|
||||
private $name;
|
||||
private $value;
|
||||
private $isNillable = false;
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function isNillable()
|
||||
{
|
||||
return $this->isNillable;
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function setNillable($isNillable)
|
||||
{
|
||||
$this->isNillable = (bool) $isNillable;
|
||||
}
|
||||
|
||||
public function getAliasName()
|
||||
{
|
||||
return 'complextype';
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
/**
|
||||
* Based on \Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationAnnotation
|
||||
*
|
||||
* @author Francis Besset <francis.besset@gmail.com>
|
||||
*/
|
||||
abstract class Configuration implements ConfigurationInterface
|
||||
{
|
||||
public function __construct(array $values)
|
||||
{
|
||||
foreach ($values as $k => $v) {
|
||||
if (!method_exists($this, $name = 'set'.$k)) {
|
||||
throw new \RuntimeException(sprintf('Unknown key "%s" for annotation "@%s".', $k, get_class($this)));
|
||||
}
|
||||
|
||||
$this->$name($v);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
/**
|
||||
* Based on \Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface
|
||||
*
|
||||
* @author Francis Besset <francis.besset@gmail.com>
|
||||
*/
|
||||
interface ConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* Returns the alias name for an annotated configuration.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getAliasName();
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
*/
|
||||
class Header extends Param
|
||||
{
|
||||
public function getAliasName()
|
||||
{
|
||||
return 'header';
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
*/
|
||||
class Method extends Configuration
|
||||
{
|
||||
private $value;
|
||||
private $service;
|
||||
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function getService()
|
||||
{
|
||||
return $this->service;
|
||||
}
|
||||
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function setService($service)
|
||||
{
|
||||
$this->service = $service;
|
||||
}
|
||||
|
||||
public function getAliasName()
|
||||
{
|
||||
return 'method';
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
*/
|
||||
class Param extends Configuration implements TypedElementInterface
|
||||
{
|
||||
private $value;
|
||||
private $phpType;
|
||||
private $xmlType;
|
||||
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function getPhpType()
|
||||
{
|
||||
return $this->phpType;
|
||||
}
|
||||
|
||||
public function getXmlType()
|
||||
{
|
||||
return $this->xmlType;
|
||||
}
|
||||
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function setPhpType($phpType)
|
||||
{
|
||||
$this->phpType = $phpType;
|
||||
}
|
||||
|
||||
public function setXmlType($xmlType)
|
||||
{
|
||||
$this->xmlType = $xmlType;
|
||||
}
|
||||
|
||||
public function getAliasName()
|
||||
{
|
||||
return 'param';
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
*/
|
||||
class Result extends Configuration implements TypedElementInterface
|
||||
{
|
||||
private $phpType;
|
||||
private $xmlType;
|
||||
|
||||
public function getPhpType()
|
||||
{
|
||||
return $this->phpType;
|
||||
}
|
||||
|
||||
public function getXmlType()
|
||||
{
|
||||
return $this->xmlType;
|
||||
}
|
||||
|
||||
public function setPhpType($phpType)
|
||||
{
|
||||
$this->phpType = $phpType;
|
||||
}
|
||||
|
||||
public function setXmlType($xmlType)
|
||||
{
|
||||
$this->xmlType = $xmlType;
|
||||
}
|
||||
|
||||
public function getAliasName()
|
||||
{
|
||||
return 'result';
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the BeSimpleSoapBundle.
|
||||
*
|
||||
* (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 BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||
|
||||
interface TypedElementInterface
|
||||
{
|
||||
function getPhpType();
|
||||
function getXmlType();
|
||||
function setPhpType($phpType);
|
||||
function setXmlType($xmlType);
|
||||
}
|
Reference in New Issue
Block a user