Skip to content
Code-Schnipsel Gruppen Projekte
Commit 45fc0f23 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

refactor: return uuid

Übergeordneter 2993aaf5
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -13,6 +13,7 @@
* Class User
* ERP User, an user object compatible to the QUIQQER User Interface
*
* @todo implement UUID
* @package QUI\ERP
*/
class User extends QUI\QDOM implements UserInterface
......@@ -22,6 +23,11 @@ class User extends QUI\QDOM implements UserInterface
*/
protected $id;
/**
* @var mixed
*/
protected $uuid;
/**
* @var string
*/
......@@ -77,7 +83,7 @@ public function __construct(array $attributes)
foreach ($needle as $attribute) {
if (!isset($attributes[$attribute])) {
throw new QUI\ERP\Exception(
'Missing attribute:' . $attribute
'Missing attribute:'.$attribute
);
}
}
......@@ -91,6 +97,10 @@ public function __construct(array $attributes)
$this->lastName = $attributes['lastname'];
$this->country = $attributes['country'];
if (isset($attributes['uuid'])) {
$this->uuid = $attributes['uuid'];
}
if (isset($attributes['data']) && is_array($attributes['data'])) {
$this->data = $attributes['data'];
$this->setAttributes($this->data);
......@@ -214,12 +224,20 @@ public function getId()
return $this->id;
}
/**
* @return mixed
*/
public function getUniqueId()
{
return $this->uuid;
}
/**
* @return mixed
*/
public function getName()
{
return $this->firstName . ' ' . $this->lastName;
return $this->firstName.' '.$this->lastName;
}
/**
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren