2013-10-15 11:46:12 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the BeSimpleSoap.
|
|
|
|
*
|
|
|
|
* (c) Christian Kerl <christian-kerl@web.de>
|
|
|
|
* (c) Francis Besset <francis.besset@gmail.com>
|
|
|
|
*
|
|
|
|
* This source file is subject to the MIT license that is bundled
|
|
|
|
* with this source code in the file LICENSE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace BeSimple\SoapCommon\Definition;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Francis Besset <francis.besset@gmail.com>
|
|
|
|
*/
|
|
|
|
class Part
|
|
|
|
{
|
|
|
|
protected $name;
|
|
|
|
protected $type;
|
|
|
|
protected $nillable;
|
2020-07-15 16:16:25 +02:00
|
|
|
protected $minOccurs;
|
2013-10-15 11:46:12 +02:00
|
|
|
|
2020-07-15 16:16:25 +02:00
|
|
|
public function __construct($name, $type, $nillable = false, $minOccurs = 1)
|
2013-10-15 11:46:12 +02:00
|
|
|
{
|
|
|
|
$this->name = $name;
|
|
|
|
$this->type = $type;
|
2020-07-15 16:16:25 +02:00
|
|
|
$this->minOccurs = $minOccurs;
|
2013-10-15 11:46:12 +02:00
|
|
|
$this->setNillable($nillable);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getName()
|
|
|
|
{
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getType()
|
|
|
|
{
|
|
|
|
return $this->type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setType($type)
|
|
|
|
{
|
|
|
|
$this->type = $type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isNillable()
|
|
|
|
{
|
|
|
|
return $this->nillable;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setNillable($nillable)
|
|
|
|
{
|
2020-07-15 16:16:25 +02:00
|
|
|
$this->nillable = (bool) $nillable;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setMinOccurs($minOccurs)
|
|
|
|
{
|
|
|
|
$this->minOccurs = $minOccurs;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getMinOccurs()
|
|
|
|
{
|
|
|
|
return $this->minOccurs;
|
2013-10-15 11:46:12 +02:00
|
|
|
}
|
|
|
|
}
|