Newscoop\Entity\User::getComments PHP 메소드

getComments() 공개 메소드

Get a User's comments which are associated with his User account.
public getComments ( ) : array
리턴 array
    public function getComments()
    {
        $comments = array();
        foreach ($this->commenters as $commenter) {
            foreach ($commenter->getComments() as $comment) {
                $comments[] = $comment;
            }
        }
        return $comments;
    }

Usage Example

예제 #1
0
 public function getComments()
 {
     $this->__load();
     return parent::getComments();
 }