Exemplo n.º 1
0
 public function __construct(UserInterface $user)
 {
     $this->userId = $user->getId();
     $this->userType = $user->getType();
     $this->createdAt = new \DateTime();
     $this->generateToken();
 }
Exemplo n.º 2
0
 /**
  * @param UserInterface $entity
  * @return $this
  */
 public function setUserEntity(UserInterface $entity)
 {
     $method = 'set' . ucfirst($entity->getType());
     $this->{$method}($entity);
     return $this;
 }
Exemplo n.º 3
0
 public static function getEntityClassByUser(UserInterface $user)
 {
     $type = ucfirst($user->getType());
     return "Civix\\CoreBundle\\Entity\\Stripe\\Account{$type}";
 }