コード例 #1
0
ファイル: CommentService.php プロジェクト: fuca/sportsclub
 private function authorTypeHandle(Comment $a)
 {
     if ($a === null) {
         throw new Exceptions\NullPointerException("Argument Event cannot be null", 0);
     }
     try {
         $author = null;
         if ($this->getUserService() !== null) {
             $id = $this->getMixId($a->getAuthor());
             if ($id !== null) {
                 $author = $this->getUserService()->getUser($id, false);
             }
         }
         $a->setAuthor($author);
     } catch (\Exception $ex) {
         throw new Exceptions\DataErrorException($ex);
     }
 }