/** @param PostModel $model */ protected function extractInfoFromModel(&$model) { $this->title = $model->getTitle(); $this->subtitle = $model->getSubtitle(); $this->author = $model->getAuthor(); // convert date to a human readable format $this->date = date("F jS, Y", strtotime($model->getDate())); $this->postBody = $model->getPostBody(); }