예제 #1
0
 public function fetchAll()
 {
     $resultSet = $this->getDbTable()->fetchAll();
     $entries = array();
     foreach ($resultSet as $row) {
         $entry = new Application_Model_Blog();
         $entry->setId($row->id)->setUsername($row->user_name)->setDescription($row->description)->setTitle($row->title)->setDateCreated($row->date_created);
         $entries[] = $entry;
     }
     return $entries;
 }
예제 #2
0
파일: Blog.php 프로젝트: riteshsahu1981/we
 private function setModel($row)
 {
     $user = $row->findParentRow('Application_Model_DbTable_User', 'User');
     $model = new Application_Model_Blog();
     $model->setId($row->id)->setTitle($row->title)->setStatus($row->status)->setWeight($row->weight)->setCategoryId($row->category_id)->setLocation($row->location)->setTags($row->tags)->setContent($row->content)->setComment($row->comment)->setPublish($row->publish)->setJournalId($row->journal_id)->setFeatured($row->featured)->setUserId($row->user_id)->setAddedon($row->addedon)->setUpdatedon($row->updatedon)->setUserObj($user);
     return $model;
 }