Beispiel #1
0
 /**
  * @param $slackId
  * @param $title
  * @param $url
  * @return Link
  */
 public static function fromSlack(UserId $slackId, $name, $email, $image)
 {
     $user = new User();
     $user->slackId = $slackId->getValue();
     $user->name = $name;
     $user->email = $email;
     $user->image = $image;
     return $user;
 }
 /**
  * @param UserId $userId
  * @return User|null
  */
 public function findOneBySlackId(UserId $userId)
 {
     return $this->findOneBy(array('slackId' => $userId->getValue()));
 }