Пример #1
0
 public function setProblemListComments(array $comments)
 {
     $problemListComments = array();
     foreach ($this->problemListComments as $comment) {
         $problemListComments[$comment->problemListCommentId] = $comment;
     }
     $this->problemListComments = array();
     foreach ($comments as $comment) {
         $problemListComment = new ProblemListComment();
         $problemListComment->populateWithArray($comment);
         // we need to populate person
         // if not populated, this may alter the person entry (don't know why?)
         $problemListComment->author->populate();
         $this->problemListComments[] = $problemListComment;
     }
 }