Modules/Groupware/Feeds/Account/Facade.php
\Conjoon_Modules_Groupware_Feeds_Account_Facade
- Author
- Thorsten Suckow-Homberg
Properties

\Conjoon_Modules_Groupware_Feeds_Account_Model_Account
$_accountModel= 'null'
nullDetails
Methods

_getAccountDecorator(
)
:
\Conjoon_BeanContext_Decorator| Type | Description |
|---|---|
| \Conjoon_BeanContext_Decorator |

_getAccountModel(
)
:
\Conjoon_Modules_Groupware_Feeds_Account_Model_Account| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Feeds_Account_Model_Account |

_getBuilder(
)
:
\Conjoon_Modules_Groupware_Feeds_Account_Builder| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Feeds_Account_Builder |

_getItemFacade(
)
:
\Conjoon_Modules_Groupware_Feeds_Item_Facade| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Feeds_Item_Facade |

_getListBuilder(
)
:
\Conjoon_Modules_Groupware_Feeds_Account_ListBuilder| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Feeds_Account_ListBuilder |

addAccount(
Array $data, integer $userId
)
:
\Conjoon_Modules_Groupware_Feeds_Account_DtoAdds an account to the data storage.
Fields required in $data: - deleteInterval - name - requestTimeout - updateInterval - uri
| Name | Type | Description |
|---|---|---|
| $data | Array | |
| $userId | integer |
| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Feeds_Account_Dto | The recently added account, or null if not created |
| Exception | Description |
|---|---|
| \Exception |

addAccountAndImport(
Array $data, \intteger $userId
)
:
voidAdds a feed account to the data storage for the specified user in $userId.
Fields required in $data: - deleteInterval - name - requestTimeout - updateInterval - uri
| Name | Type | Description |
|---|---|---|
| $data | Array | |
| $userId | \intteger |
| Exception | Description |
|---|---|
| \Exception |

getAccount(
integer $accountId, $userId
)
:
\Conjoon_Modules_Groupware_Feeds_Account_DtoReturns the Conjoon_Modules_Groupware_Feeds_Account_Dto for the specified account id.
| Name | Type | Description |
|---|---|---|
| $accountId | integer | |
| $userId |
| Type | Description |
|---|---|
| \Conjoon_Modules_Groupware_Feeds_Account_Dto |
| Exception | Description |
|---|---|
| \InvalidArgumentExceptions |

getAccountsForUser(
integer $userId
)
:
arrayReturns an array with all Feed Accounts for the specified user id.
| Name | Type | Description |
|---|---|---|
| $userId | integer |
| Type | Description |
|---|---|
| array | Conjoon_Modules_Groupware_Feeds_AccountDto |
| Exception | Description |
|---|---|
| \InvalidArgumentExceptions |

getAccountsToUpdate(
integer $userId, integer $time
)
:
arrayReturns all accounts for the specified $userId as Conjoon_Modules_Groupware_Feeds_Account_Dto which updateInterval is exceeded based on the passed unix timestamp $time.
| Name | Type | Description |
|---|---|---|
| $userId | integer | |
| $time | integer |
| Type | Description |
|---|---|
| array | Conjoon_Modules_Groupware_Feeds_Account_Dto |

removeAccountForId(
integer $accountId, integer $userId
)
:
booleanRemoves the account as specified in $accountId for the user with the specified $userId.
| Name | Type | Description |
|---|---|---|
| $accountId | integer | |
| $userId | integer |
| Type | Description |
|---|---|
| boolean | true if the account was removed, otherwise false |
| Exception | Description |
|---|---|
| \InvalidArgumentException |

removeAccountsForIds(
array $accountIds, integer $userId
)
:
arrayRemoves all the accounts for the specified account ids, for the user with the specified $userId.
| Name | Type | Description |
|---|---|---|
| $accountIds | array | |
| $userId | integer |
| Type | Description |
|---|---|
| array | An array with the ids that got successfully removed |
| Exception | Description |
|---|---|
| \InvalidArgumentException |

setLastUpdated(
array $accountIds, integer $time
)
:
voidSets the last updated timestamp for the specified account ids to $time.
| Name | Type | Description |
|---|---|---|
| $accountIds | array | |
| $time | integer |

updateAccount(
integer $accountId, Array $data, integer $userId
)
:
booleanUpdates a single account with the data from $data for the specified $userId.
| Name | Type | Description |
|---|---|---|
| $accountId | integer | the id of the account to update. |
| $data | Array | |
| $userId | integer |
| Type | Description |
|---|---|
| boolean | true, if updating the account was successfull, otherwise false |
| Exception | Description |
|---|---|
| \Exception |

updateAccounts(
array $data, integer $userId
)
:
arrayUpdates the account data in the data storage with the account-data specified in $data.
| Name | Type | Description |
|---|---|---|
| $data | array | a numeric array where each value holds data to update for an account |
| $userId | integer | The id of the user the accounts belong to |
| Type | Description |
|---|---|
| array | a list with ids of successfully updated accounts |
| Exception | Description |
|---|---|
| \InvalidArgumentException |