Modules/Groupware/Feeds/Item/Model/Item.php
\Conjoon_Modules_Groupware_Feeds_Item_Model_Item
Table data gateway. Models the table <tt>groupware_feeds_items</tt>.
- Parent(s)
- \Conjoon_BeanContext_Decoratable < ?\Zend_Db_Table
- Author
- Thorsten Suckow-Homberg
- Category
- Model
- Uses
- \Conjoon_Db_Table
Properties

string
$_name= ''groupware_feeds_items''
The name of the table in the underlying datastore this class represents.
'groupware_feeds_items'Details- Type
- string

string
$_primary= ''id''
The name of the column that denotes the primary key for this table
'id'Details- Type
- string

String
$_tblPrefix= '""'
""Details- Type
- String
- Inherited_from
- \Conjoon_Db_Table::$$_tblPrefix
Methods

__construct(
string | array $config
=
array(), \unknown_type $definition
=
null
)
:
void__construct() - For concrete implementation of Conjoon_Db_Table
Inherited from: \Conjoon_Db_Table::__construct()This constructor automatically prepends the prefix as defined using setTablePrefix() to this table's name.
| Name | Type | Description |
|---|---|---|
| $config | string | array | string can reference a Zend_Registry key for a db adapter OR it can refernece the name of a table |
| $definition | \unknown_type |

addItemIfNotExists(
\$item $item, \$accountId $accountId
)
:
integerAdds a feed item to the users feed collection if it not already exists.
| Name | Type | Description |
|---|---|---|
| $item | \$item | array The item with it's data to insert. |
| $accountId | \$accountId | The id of the account this item will belong to |
| Type | Description |
|---|---|
| integer | 0 if the item was not added, otherwise the primary key of the newly added item |

deleteFeedItemsForIds(
Array $feedIds
)
:
integerDeletes the feed items for the specified ids.
| Name | Type | Description |
|---|---|---|
| $feedIds | Array |
| Type | Description |
|---|---|
| integer | The actual number of records deleted. |

deleteItemsForAccount(
$id
)
:
integerDeltes items belonging to a specific account.
| Name | Type | Description |
|---|---|---|
| $id |
| Type | Description |
|---|---|
| integer | The number of accounts deleted. |

deleteOldFeedItems(
integer $userId
)
:
voidDeletes old feed items based on the configured "deleteInterval"-property of the corresponding feed accounts.
| Name | Type | Description |
|---|---|---|
| $userId | integer | The id of the user the accounts belong to |

getAccountIdsForFeedIds(
array $feedIds
)
:
arrayReturns the account ids for the specified feed ids.
| Name | Type | Description |
|---|---|---|
| $feedIds | array | The ids of the feed items to return the corresponding accountids for. |
| Type | Description |
|---|---|
| array |

getFeedItemIdsToDelete(
integer $userId
)
:
ArrayReturns a list of feed items that can be deleted based on the accounts configured deleteInterval.
| Name | Type | Description |
|---|---|---|
| $userId | integer | The id of the user for which deletable feed items should be returned. |
| Type | Description |
|---|---|
| Array |

getItem(
int $id
)
:
mixedReturns a feed item by the specified id
| Name | Type | Description |
|---|---|---|
| $id | int | The id of the item to query |
| Type | Description |
|---|---|
| mixed |

getItemsForAccount(
int $id
)
:
\Zend_Db_Table_RowsetReturns all feeds accounts for the specified account-id.
| Name | Type | Description |
|---|---|---|
| $id | int | The id of the user to get the email accounts for |
| Type | Description |
|---|---|
| \Zend_Db_Table_Rowset |

setItemRead(
mixed $id, boolean $read
)
:
integerMarks a single or more feed item(s) either read or unread.
| Name | Type | Description |
|---|---|---|
| $id | mixed | The id of a single feed item or a numeric array with the ids of the feed items to update |
| $read | boolean | true for marking the item(s) as read, otherwise false for setting the item(s) as unread |
| Type | Description |
|---|---|
| integer | The total number of rows updated |