Add minOccurs annotation support on complexType

This commit is contained in:
2020-07-15 16:16:25 +02:00
parent 30850d7a01
commit e024833d48
6 changed files with 84 additions and 33 deletions

View File

@ -20,11 +20,13 @@ class Part
protected $name;
protected $type;
protected $nillable;
protected $minOccurs;
public function __construct($name, $type, $nillable = false)
public function __construct($name, $type, $nillable = false, $minOccurs = 1)
{
$this->name = $name;
$this->type = $type;
$this->minOccurs = $minOccurs;
$this->setNillable($nillable);
}
@ -50,6 +52,16 @@ class Part
public function setNillable($nillable)
{
$this->nillable = (boolean) $nillable;
$this->nillable = (bool) $nillable;
}
public function setMinOccurs($minOccurs)
{
$this->minOccurs = $minOccurs;
}
public function getMinOccurs()
{
return $this->minOccurs;
}
}