예제 #1
0
파일: Key.php 프로젝트: dotuancd/secretary
 /**
  * @param  \Secretary\Entity\Key  $key
  * @param  \Secretary\Entity\User $user
  * @return \Secretary\Entity\Key
  */
 public function saveKey(KeyEntity $key, UserEntity $user, $pubKey)
 {
     $key->setPubKey($pubKey);
     $key->setUserId($user->getId());
     $key->setUser($user);
     $this->em->persist($key);
     $this->em->flush();
     return $key;
 }
 /**
  * {@inheritDoc}
  */
 public function setUserId($userId)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUserId', array($userId));
     return parent::setUserId($userId);
 }