Modules/Groupware/Email/Folder/Model/FoldersAccounts.php
\Conjoon_Modules_Groupware_Email_Folder_Model_FoldersAccounts
Table data gateway. Models the table <tt>groupware_email_folders_accounts</tt>.
- Parent(s)
- \Conjoon_Db_Table < \Zend_Db_Table
- Author
- Thorsten Suckow-Homberg
- Category
- Model
- Uses
- \Conjoon_Db_Table
Properties

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

string
$_primary= 'array(
'groupware_email_folders_id',
'groupware_email_accounts_id'
)'
The name of the column that denotes the primary key for this table
array(
'groupware_email_folders_id',
'groupware_email_accounts_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 |

deleteForAccountId(
$accountId
)
:
integerDeletes all data for the account with the specified account id.
If there are currently other accounts existing which are using the folders the account id is currently using, no data will be deleted.
| Name | Type | Description |
|---|---|---|
| $accountId |
| Type | Description |
|---|---|
| integer | 0 if no data was deleted, otherwise the number of deleted data |

deleteForFolder(
integer $id
)
:
integerDeletes all data for the folder with the specified id.
| Name | Type | Description |
|---|---|---|
| $id | integer |
| Type | Description |
|---|---|
| integer | 0 if no data was deleted, otherwise the number of deleted data |

getAccountIdsMappedToFolderIds(
Array $folderIds
)
:
ArrayChecks whether any of the folderIds as found in the passed numeric array still have a mapping in this table.
| Name | Type | Description |
|---|---|---|
| $folderIds | Array |
| Type | Description |
|---|---|
| Array | Returns an associative array with the key being the folder id, and the value being an array with mapped account ids. |

getFolderIdsForAccountId(
integer $accountId
)
:
arrayReturns all the folder ids for a scpecific account id.
| Name | Type | Description |
|---|---|---|
| $accountId | integer |
| Type | Description |
|---|---|
| array | A numeric array with the folder ids as the values. |

inheritFromParentIdForFolderId(
integer $parentId, integer $id
)
:
integerReads out the account ids mapped to the folder with the parent id and writes this information into the table under the new $id.
| Name | Type | Description |
|---|---|---|
| $parentId | integer | The parent's folder information |
| $id | integer | The new id under which all information previously fetched from $parentId should be written. |
| Type | Description |
|---|---|
| integer | The total number of new entires added |

mapFolderIdsToAccountId(
array $folderIds, integer $accountId
)
:
integerMaps the specified folder ids in $folderIds to the account id specified in $accountId.
| Name | Type | Description |
|---|---|---|
| $folderIds | array | |
| $accountId | integer |
| Type | Description |
|---|---|
| integer | The total number of data added |