infinito/application/src/Entity/Attribut/UsernameAttribut.php

27 lines
477 B
PHP
Raw Normal View History

2018-09-06 15:14:33 +02:00
<?php
2018-09-12 22:25:22 +02:00
2018-09-06 15:14:33 +02:00
namespace App\Entity\Attribut;
/**
2018-09-12 22:25:22 +02:00
* This trait doesn't need an own interface because it's covered by symfony.
*
2018-09-06 15:14:33 +02:00
* @author kevinfrantz
*/
2018-09-12 22:25:22 +02:00
trait UsernameAttribut
{
2018-09-06 15:14:33 +02:00
/**
* @ORM\Column(type="string", length=25, unique=true)
*/
protected $username;
2018-09-12 22:25:22 +02:00
public function getUsername(): ?string
2018-09-06 15:14:33 +02:00
{
return $this->username;
}
2018-09-12 22:25:22 +02:00
public function setUsername(string $username): void
{
$this->username = \trim($username);
2018-09-06 15:14:33 +02:00
}
}