Modules/Groupware/Feeds/Account/Model/Account.php

Show: inherited
Table of Contents

\Conjoon_Modules_Groupware_Feeds_Account_Model_Account

Package: Conjoon\Groupware\Feeds\Model

Table data gateway. Models the table <tt>groupware_feeds_accounts</tt>.

Parent(s)
\Conjoon_BeanContext_Decoratable < ?\Zend_Db_Table
Author
Thorsten Suckow-Homberg  
Category
Model  
Uses
\Conjoon_Db_Table  

Properties

Propertyprotectedstring  $_name= ''groupware_feeds_accounts''

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

Default value'groupware_feeds_accounts'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
methodpublicaddAccount( array $data, integer $userId ) : integer

Adds a new account.

Parameters
Name Type Description
$data array

An associative array with the key/value pairs.

$userId integer

The id of the user for which the account gets added

Returns
Type Description
integer The id of the newly added data
methodpublicdeleteAccount( integer $id, boolean $removeFeedItems = true ) : boolean

Removes the account with the specified id entirely.

Parameters
Name Type Description
$id integer
$removeFeedItems boolean

Whether or not to remove corresponding feed items. Defaults to true.

Returns
Type Description
boolean true if the account was deleted, otherwise false
methodpublicgetAccount( integer $id ) : \Zend_Db_Table_row

Returns the account with the specified id.

Parameters
Name Type Description
$id integer

The id of the account to query.

Returns
Type Description
\Zend_Db_Table_row
methodpublicgetAccountsForUser( int $id ) : \Zend_Db_Table_Rowset

Returns all feeds accounts for the specified user-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
methodpublicgetAccountsToUpdate( integer $userId, integer $time ) : \Zend_Db_Table_Rowset

Returns all accounts which need to be updated with new feed items.

Based on the passed timestamp, only those accounts get returned where the $time minus the last_update field of an account is greater than the value of the update_field of the account.

Parameters
Name Type Description
$userId integer

The id of the user the accounts belong to

$time integer

The timestamp that is used to measure if a new update of a specific account is neccessary

Returns
Type Description
\Zend_Db_Table_Rowset
methodpublicgetDecoratableMethods( ) : void

methodpublicgetRepresentedEntity( ) : void

methodpublicgetTablePrefix( ) : String
staticinherited

Returns the table prefix.

Inherited from: \Conjoon_Db_Table::getTablePrefix()
Returns
Type Description
String
methodpublicsetLastUpdated( mixed $id, integer $timestamp ) : integer

Updates last_update field of one or more rows.

Parameters
Name Type Description
$id mixed

Either an integer with teh id of the row to update or a numeric array with the ids of the rows to update

$timestamp integer

The timestamp value for the last_updated field

Returns
Type Description
integer The 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
methodpublicupdateAccount( integer $id, array $data ) : boolean

Updates the account with the specified id with the passed values.

Parameters
Name Type Description
$id integer

The of the account to update

$data array

an associative array with key/value pairs.

Returns
Type Description
boolean true if the account was updated, otherwise, false
Documentation was generated by DocBlox 0.18.1.