public function __construct(User $user, $comment) { $this->setParent($user->getId()); $this->comment = $comment; }
public function addFriend(User $user) { if (!in_array($user->getId(), $this->friends)) { $this->friends[] = $user->getId(); } }
public function __construct(User $user, $comment) { $this->setParent($user->getId()); $this->comment = $comment; }
public function addFriend(User $user) { if (!in_array($user->getId(), $this->friends)) { $this->friends[] = $user->getId(); } }