Modules/Groupware/Email/Folder/Model/FoldersAccounts.php

Show: inherited
Table of Contents

\Conjoon_Modules_Groupware_Email_Folder_Model_FoldersAccounts

Package: Conjoon\Groupware\Email\Model

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

Propertyprotectedstring  $_name= ''groupware_email_folders_accounts''

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

Default value'groupware_email_folders_accounts'Details
Type
string
Propertyprotectedstring  $_primary= 'array( 'groupware_email_folders_id', 'groupware_email_accounts_id' )'

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

Default valuearray( 'groupware_email_folders_id', 'groupware_email_accounts_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
methodpublicdeleteForAccountId(  $accountId ) : integer

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

Parameters
Name Type Description
$accountId
Returns
Type Description
integer 0 if no data was deleted, otherwise the number of deleted data
methodpublicdeleteForFolder( integer $id ) : integer

Deletes all data for the folder with the specified id.

Parameters
Name Type Description
$id integer
Returns
Type Description
integer 0 if no data was deleted, otherwise the number of deleted data
methodpublicgetAccountIdsMappedToFolderIds( Array $folderIds ) : Array

Checks whether any of the folderIds as found in the passed numeric array still have a mapping in this table.

Parameters
Name Type Description
$folderIds Array
Returns
Type Description
Array Returns an associative array with the key being the folder id, and the value being an array with mapped account ids.
methodpublicgetFolderIdsForAccountId( integer $accountId ) : array

Returns all the folder ids for a scpecific account id.

Parameters
Name Type Description
$accountId integer
Returns
Type Description
array A numeric array with the folder ids as the values.
methodpublicgetTablePrefix( ) : String
staticinherited

Returns the table prefix.

Inherited from: \Conjoon_Db_Table::getTablePrefix()
Returns
Type Description
String
methodpublicinheritFromParentIdForFolderId( integer $parentId, integer $id ) : integer

Reads out the account ids mapped to the folder with the parent id and writes this information into the table under the new $id.

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

Returns
Type Description
integer The total number of new entires added
methodpublicmapFolderIdsToAccountId( array $folderIds, integer $accountId ) : integer

Maps the specified folder ids in $folderIds to the account id specified in $accountId.

Parameters
Name Type Description
$folderIds array
$accountId integer
Returns
Type Description
integer The total number of data added
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.