public function report($text = '') { $comment_report = new Comment_report(); $comment_report->comment_id = $this->id; if ($text != '') { $comment_report->text = $text; } $comment_report->time_of_creation = time(); $comment_report->save(); }