Modules/Service/Twitter/Account/Model/Account.php

Show: inherited
Table of Contents

\Conjoon_Modules_Service_Twitter_Account_Model_Account

Package: Conjoon\Modules\Service\Twitter\Model

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

Constant  UPDATE_INTERVAL_DEFAULT = 60000

Properties

Propertyprotectedstring  $_name= ''service_twitter_accounts''

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

Default value'service_twitter_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
methodpublicaddAccountForUserId( Array $data, integer $userId ) : \the

Adss a Twitter account to the db.

Parameters
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

Returns
Type Description
\the id of the added data, or 0 if an error occurred
methodpublicdeleteAccountForId( integer $accountId ) : boolean

Removes the account with the specified id.

Parameters
Name Type Description
$accountId integer

The id of the account to remove

Returns
Type Description
boolean false if the accoutn was not removed, otherwise true
methodpublicgetAccount( int $id ) : \Zend_Db_Table_Rowset

Returns the twitter account for the specified account-id.

Parameters
Name Type Description
$id int

The id of the account to retrieve

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

Returns all twitter 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
methodpublicgetDecoratableMethods( ) : void

methodpublicgetRepresentedEntity( ) : void

methodpublicgetTablePrefix( ) : String
staticinherited

Returns the table prefix.

Inherited from: \Conjoon_Db_Table::getTablePrefix()
Returns
Type Description
String
methodpublicsetTablePrefix( String $prefix ) : void
staticinherited

Sets the table prefix.

Inherited from: \Conjoon_Db_Table::setTablePrefix()
Parameters
Name Type Description
$prefix String
methodpublicupdateAccountForId( array $data, integer $accountId ) : boolean

Updates the account with the specified id with the data found in $data.

Parameters
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

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