summaryrefslogtreecommitdiff
path: root/app/models/Entry.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-22 18:00:13 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-22 18:00:13 +0200
commit0426541acbeb44d240e6dbf7a93f3a104bea61b4 (patch)
tree209a425c5afee9e627d11023b262326812be1fbc /app/models/Entry.php
parentfb57be5a5af3a2fb46b2dbf2b503ffe78eb5cf49 (diff)
Grosse màj : ajout de la configuration + ajouts divers fonctionnalités
Diffstat (limited to 'app/models/Entry.php')
-rwxr-xr-xapp/models/Entry.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php
index 85e04cb4e..67d255c55 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -9,8 +9,9 @@ class Entry extends Model {
private $date;
private $is_read;
private $is_favorite;
+ private $feed;
- public function __construct ($guid = '', $title = '', $author = '', $content = '',
+ public function __construct ($feed = '', $guid = '', $title = '', $author = '', $content = '',
$link = '', $pubdate = 0, $is_read = false, $is_favorite = false) {
$this->_guid ($guid);
$this->_title ($title);
@@ -20,6 +21,7 @@ class Entry extends Model {
$this->_date ($pubdate);
$this->_isRead ($is_read);
$this->_isFavorite ($is_favorite);
+ $this->_feed ($feed);
}
public function id () {
@@ -53,6 +55,14 @@ class Entry extends Model {
public function isFavorite () {
return $this->is_favorite;
}
+ public function feed ($object = false) {
+ if ($object) {
+ $feedDAO = new FeedDAO ();
+ return $feedDAO->searchById ($this->feed);
+ } else {
+ return $this->feed;
+ }
+ }
public function _guid ($value) {
$this->guid = $value;
@@ -78,6 +88,9 @@ class Entry extends Model {
public function _isFavorite ($value) {
$this->is_favorite = $value;
}
+ public function _feed ($value) {
+ $this->feed = $value;
+ }
}
class EntryDAO extends Model_array {
@@ -162,6 +175,7 @@ class HelperEntry {
foreach ($listDAO as $key => $dao) {
$list[$key] = new Entry (
+ $dao['feed'],
$dao['guid'],
$dao['title'],
$dao['author'],