Array support change

Support of mapping xml attributes
This commit is contained in:
Michael Veroux
2019-02-11 12:16:41 +01:00
parent ad93b5ca49
commit 3f2a99adf6
10 changed files with 112 additions and 12 deletions

View File

@ -48,13 +48,13 @@ class Message
return 0 === count($this->parts) ? true : false;
}
public function add($name, $phpType, $nillable = false)
public function add($name, $phpType, $nillable = false, $attribute = false)
{
if ($phpType instanceof TypeInterface) {
$phpType = $phpType->getPhpType();
}
$this->parts[$name] = new Part($name, $phpType, $nillable);
$this->parts[$name] = new Part($name, $phpType, $nillable, $attribute);
return $this;
}