Modules/Service/Twitter/Account/Model/Account.php
\Conjoon_Modules_Service_Twitter_Account_Model_Account
Table data gateway. Models the table <tt>service_twitter_accounts</tt>.
- Parent(s)
- \Conjoon_BeanContext_Decoratable < ?\Zend_Db_Table
- Author
- Thorsten Suckow-Homberg
- Category
- Model
- Uses
- \Conjoon_Db_Table
Constants
Properties

string
$_name= ''service_twitter_accounts''
The name of the table in the underlying datastore this class represents.
'service_twitter_accounts'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 |

addAccountForUserId(
Array $data, integer $userId
)
:
\theAdss a Twitter account to the db.
| Name | Type | Description |
|---|---|---|
| $data | Array | An assoc array with the following key/value pairs: name, oauth_token, oauth_token_secret, updateInterval, twitter_id |
| $userId | integer | id of the ser for whom the data will be added |
| Type | Description |
|---|---|
| \the | id of the added data, or 0 if an error occurred |

deleteAccountForId(
integer $accountId
)
:
booleanRemoves the account with the specified id.
| Name | Type | Description |
|---|---|---|
| $accountId | integer | The id of the account to remove |
| Type | Description |
|---|---|
| boolean | false if the accoutn was not removed, otherwise true |

getAccount(
int $id
)
:
\Zend_Db_Table_RowsetReturns the twitter account for the specified account-id.
| Name | Type | Description |
|---|---|---|
| $id | int | The id of the account to retrieve |
| Type | Description |
|---|---|
| \Zend_Db_Table_Rowset |

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

updateAccountForId(
array $data, integer $accountId
)
:
booleanUpdates the account with the specified id with the data found in $data.
| Name | Type | Description |
|---|---|---|
| $data | array | An associative array with key/value pairs which represents the data to update. |
| $accountId | integer | The id of the account to update with the given data |
| Type | Description |
|---|---|
| boolean | false if the account was not updated, otherwise true |