<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class UserData {
/**
* @var int
*/
private $id;
/**
* @var \App\Entity\Person
*/
private $person;
/**
* @var \App\Entity\Address
*/
private $address;
/**
* @var \App\Entity\Communication
*/
private $communication;
/**
* @var \DateTime|null
*/
private $changedAt;
/**
* @var \App\Entity\User
*/
private $user;
/**
* Get id.
*
* @return int
*/
public function getId() {
return $this->id;
}
/**
* Set changedAt.
*
* @param \DateTime|null $changedAt
*
* @return UserData
*/
public function setChangedAt($changedAt = null) {
$this->changedAt = $changedAt;
return $this;
}
/**
* Get changedAt.
*
* @return \DateTime|null
*/
public function getChangedAt() {
return $this->changedAt;
}
/**
* Set user.
*
* @param \App\Entity\User|null $user
*
* @return UserData
*/
public function setUser(\App\Entity\User $user = null) {
$this->user = $user;
return $this;
}
/**
* Get user.
*
* @return \App\Entity\User|null
*/
public function getUser() {
return $this->user;
}
/**
* Set person.
*
* @param \App\Entity\Person|null $person
*
* @return UserData
*/
public function setPerson(\App\Entity\Person $person = null) {
$this->person = $person;
return $this;
}
/**
* Get person.
*
* @return \App\Entity\Person|null
*/
public function getPerson() {
return $this->person;
}
/**
* Set address.
*
* @param \App\Entity\Address|null $address
*
* @return UserData
*/
public function setAddress(\App\Entity\Address $address = null) {
$this->address = $address;
return $this;
}
/**
* Get address.
*
* @return \App\Entity\Address|null
*/
public function getAddress() {
return $this->address;
}
/**
* Set communication.
*
* @param \App\Entity\Communication|null $communication
*
* @return UserData
*/
public function setCommunication(\App\Entity\Communication $communication = null) {
$this->communication = $communication;
return $this;
}
/**
* Get communication.
*
* @return \App\Entity\Communication|null
*/
public function getCommunication() {
return $this->communication;
}
public function getName() {
if (!empty($this->person)) {
return $this->person->getName();
}
return '';
}
public function getFullName() {
if (!empty($this->person)) {
return $this->person->getFullName();
}
return '';
}
}