kekrozsak/src/KekRozsak/FrontBundle/Entity/User.php

203 lines
3.3 KiB
PHP
Raw Normal View History

<?php
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* KekRozsak\FrontBundle\Entity\User
*/
class User implements UserInterface
{
/**
* @var integer $id
*/
private $id;
/**
* @var string $username
*/
private $username;
/**
* @var string $password
*/
private $password;
/**
* @var string $email
*/
private $email;
/**
* @var DateTime $registered_at
*/
private $registered_at;
/**
* @var string $display_name
*/
private $display_name;
/**
* @var \Doctrine\Common\Collections\ArrayCollection
*/
private $roles;
public function __construct()
{
$this->roles = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set username
*
* @param string $username
* @return User
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Get username
*
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* Set password
*
* @param string $password
* @return User
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
* Get password
*
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* Set email
*
* @param string $email
* @return User
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set registered_at
*
* @param DateTime $registeredAt
* @return User
*/
public function setRegisteredAt(\DateTime $registeredAt)
{
$this->registered_at = $registeredAt;
return $this;
}
/**
* Get registered_at
*
* @return DateTime
*/
public function getRegisteredAt()
{
return $this->registered_at;
}
/**
* Set display_name
*
* @param string $displayName
* @return User
*/
public function setDisplayName($displayName)
{
$this->display_name = $displayName;
return $this;
}
/**
* Get display_name
*
* @return string
*/
public function getDisplayName()
{
return $this->display_name;
}
/**
* Add roles
*
* @param KekRozsak\FrontBundle\Entity\Role $roles
* @return User
*/
public function addRole(\KekRozsak\FrontBundle\Entity\Role $roles)
{
$this->roles[] = $roles;
return $this;
}
/**
* Get roles
*
* @return Doctrine\Common\Collections\Collection
*/
public function getRoles()
{
return $this->roles->toArray();
}
public function eraseCredentials()
{
}
public function getSalt()
{
return $this->password;
}
}