Esempio n. 1
0
 /**
  * 신고 추가
  *
  * @param string        $targetId targetId
  * @param UserInterface $author   user instance
  * @param string        $shortCut 바로가기
  * @return void
  */
 public function add($targetId, UserInterface $author, $shortCut)
 {
     if ($this->has($targetId, $author) === true) {
         throw new Exceptions\AlreadyClaimedException();
     }
     ClaimLog::create(['claimType' => $this->claimType, 'shortCut' => $shortCut, 'targetId' => $targetId, 'userId' => $author->getId(), 'ipaddress' => $_SERVER['REMOTE_ADDR']]);
 }