Modules/Groupware/Feeds/Account/Facade.php

Show: inherited
Table of Contents

\Conjoon_Modules_Groupware_Feeds_Account_Facade

Package: Default

Author
Thorsten Suckow-Homberg  

Properties

Propertyprivate\Conjoon_BeanContext_Decorator  $_accountDecorator= 'null'

Default valuenullDetails
Type
\Conjoon_BeanContext_Decorator
Propertyprivate\Conjoon_Modules_Groupware_Feeds_Account_Model_Account  $_accountModel= 'null'

Propertyprivate\Conjoon_Modules_Groupware_Feeds_Account_Builder  $_builder= 'null'

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Feeds_Account_Builder
Propertyprivate\Conjoon_Modules_Groupware_Feeds_Account_Facade  $_instance= 'null'
static

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Feeds_Account_Facade
Propertyprivate\Conjoon_Modules_Groupware_Feeds_Item_Facade  $_itemFacade= 'null'

Default valuenullDetails
Type
\Conjoon_Modules_Groupware_Feeds_Item_Facade
Propertyprivate\Conjoon_Modules_Groupware_Feeds_Account_ListBuilder  $_listBuilder= 'null'

Propertyprivate\Conjoon_Modules_Groupware_Feeds_Account_Filter_Account  $_updateAccountFilter= 'null'

Methods

methodprivate__clone( ) : void

methodprivate__construct( ) : void

methodprivate_getAccountDecorator( ) : \Conjoon_BeanContext_Decorator

Returns
Type Description
\Conjoon_BeanContext_Decorator
methodprivate_getUpdateAccountFilter( ) : void

methodpublicaddAccount( Array $data, integer $userId ) : \Conjoon_Modules_Groupware_Feeds_Account_Dto

Adds an account to the data storage.

Fields required in $data: - deleteInterval - name - requestTimeout - updateInterval - uri

Parameters
Name Type Description
$data Array
$userId integer
Returns
Type Description
\Conjoon_Modules_Groupware_Feeds_Account_Dto The recently added account, or null if not created
Throws
Exception Description
\Exception
methodpublicaddAccountAndImport( Array $data, \intteger $userId ) : void

Adds a feed account to the data storage for the specified user in $userId.

Fields required in $data: - deleteInterval - name - requestTimeout - updateInterval - uri

Parameters
Name Type Description
$data Array
$userId \intteger
Throws
Exception Description
\Exception
methodpublicgetAccount( integer $accountId,  $userId ) : \Conjoon_Modules_Groupware_Feeds_Account_Dto

Returns the Conjoon_Modules_Groupware_Feeds_Account_Dto for the specified account id.

Parameters
Name Type Description
$accountId integer
$userId
Returns
Type Description
\Conjoon_Modules_Groupware_Feeds_Account_Dto
Throws
Exception Description
\InvalidArgumentExceptions
methodpublicgetAccountsForUser( integer $userId ) : array

Returns an array with all Feed Accounts for the specified user id.

Parameters
Name Type Description
$userId integer
Returns
Type Description
array Conjoon_Modules_Groupware_Feeds_AccountDto
Throws
Exception Description
\InvalidArgumentExceptions
methodpublicgetAccountsToUpdate( integer $userId, integer $time ) : array

Returns all accounts for the specified $userId as Conjoon_Modules_Groupware_Feeds_Account_Dto which updateInterval is exceeded based on the passed unix timestamp $time.

Parameters
Name Type Description
$userId integer
$time integer
Returns
Type Description
array Conjoon_Modules_Groupware_Feeds_Account_Dto
methodpublicgetInstance( ) : void
static

methodpublicremoveAccountForId( integer $accountId, integer $userId ) : boolean

Removes the account as specified in $accountId for the user with the specified $userId.

Parameters
Name Type Description
$accountId integer
$userId integer
Returns
Type Description
boolean true if the account was removed, otherwise false
Throws
Exception Description
\InvalidArgumentException
methodpublicremoveAccountsForIds( array $accountIds, integer $userId ) : array

Removes all the accounts for the specified account ids, for the user with the specified $userId.

Parameters
Name Type Description
$accountIds array
$userId integer
Returns
Type Description
array An array with the ids that got successfully removed
Throws
Exception Description
\InvalidArgumentException
methodpublicsetLastUpdated( array $accountIds, integer $time ) : void

Sets the last updated timestamp for the specified account ids to $time.

Parameters
Name Type Description
$accountIds array
$time integer
methodpublicupdateAccount( integer $accountId, Array $data, integer $userId ) : boolean

Updates a single account with the data from $data for the specified $userId.

Parameters
Name Type Description
$accountId integer

the id of the account to update.

$data Array
$userId integer
Returns
Type Description
boolean true, if updating the account was successfull, otherwise false
Throws
Exception Description
\Exception
methodpublicupdateAccounts( array $data, integer $userId ) : array

Updates the account data in the data storage with the account-data specified in $data.

Parameters
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

Returns
Type Description
array a list with ids of successfully updated accounts
Throws
Exception Description
\InvalidArgumentException
Documentation was generated by DocBlox 0.18.1.