public function json_encode() { $toReturn = array('id' => $this->id, 'date' => $this->formatedTime(), 'text' => text::convertText($this->text)); return $toReturn; }