Modules/Groupware/Feeds/Item/Model/Item.php

Show: inherited
Table of Contents

\Conjoon_Modules_Groupware_Feeds_Item_Model_Item

Package: Conjoon\Groupware\Feeds\Model

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

Propertyprotectedstring  $_name= ''groupware_feeds_items''

The name of the table in the underlying datastore this class represents.

Default value'groupware_feeds_items'Details
Type
string
Propertyprotectedstring  $_primary= ''id''

The name of the column that denotes the primary key for this table

Default value'id'Details
Type
string
PropertyprotectedString  $_tblPrefix= '""'
staticinherited

Default table prefix.

Inherited from: \Conjoon_Db_Table::$$_tblPrefix
Default value""Details
Type
String
Inherited_from
\Conjoon_Db_Table::$$_tblPrefix  

Methods

methodpublic__construct( string | array $config = array(), \unknown_type $definition = null ) : void
inherited

__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.

Parameters
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
methodpublicaddItemIfNotExists( \$item $item, \$accountId $accountId ) : integer

Adds a feed item to the users feed collection if it not already exists.

Parameters
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

Returns
Type Description
integer 0 if the item was not added, otherwise the primary key of the newly added item
methodpublicdeleteFeedItemsForIds( Array $feedIds ) : integer

Deletes the feed items for the specified ids.

Parameters
Name Type Description
$feedIds Array
Returns
Type Description
integer The actual number of records deleted.
methodpublicdeleteItemsForAccount(  $id ) : integer

Deltes items belonging to a specific account.

Parameters
Name Type Description
$id
Returns
Type Description
integer The number of accounts deleted.
methodpublicdeleteOldFeedItems( integer $userId ) : void

Deletes old feed items based on the configured "deleteInterval"-property of the corresponding feed accounts.

Parameters
Name Type Description
$userId integer

The id of the user the accounts belong to

methodpublicgetAccountIdsForFeedIds( array $feedIds ) : array

Returns the account ids for the specified feed ids.

Parameters
Name Type Description
$feedIds array

The ids of the feed items to return the corresponding accountids for.

Returns
Type Description
array
methodpublicgetDecoratableMethods( ) : void

methodpublicgetFeedItemIdsToDelete( integer $userId ) : Array

Returns a list of feed items that can be deleted based on the accounts configured deleteInterval.

Parameters
Name Type Description
$userId integer

The id of the user for which deletable feed items should be returned.

Returns
Type Description
Array
methodpublicgetItem( int $id ) : mixed

Returns a feed item by the specified id

Parameters
Name Type Description
$id int

The id of the item to query

Returns
Type Description
mixed
methodpublicgetItemsForAccount( int $id ) : \Zend_Db_Table_Rowset

Returns all feeds accounts for the specified account-id.

Parameters
Name Type Description
$id int

The id of the user to get the email accounts for

Returns
Type Description
\Zend_Db_Table_Rowset
methodpublicgetRepresentedEntity( ) : void

methodpublicgetTablePrefix( ) : String
staticinherited

Returns the table prefix.

Inherited from: \Conjoon_Db_Table::getTablePrefix()
Returns
Type Description
String
methodpublicsetItemRead( mixed $id, boolean $read ) : integer

Marks a single or more feed item(s) either read or unread.

Parameters
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

Returns
Type Description
integer The total number of rows updated
methodpublicsetTablePrefix( String $prefix ) : void
staticinherited

Sets the table prefix.

Inherited from: \Conjoon_Db_Table::setTablePrefix()
Parameters
Name Type Description
$prefix String
Documentation was generated by DocBlox 0.18.1.